mirror

The mirror macro allows you to mirror points and/or paths around a mirror line.

It is provided by the mirror plugin, which is part of core-plugins (so it is available by default).

Signature

Javascript
macro('mirror', {
  Boolean clone,
  Array mirror,
  Function nameFormat,
  Array paths,
  Array points,
  String prefix,
})

Example

Configuration

PropertyDefaultTypeDescription
mirrorarrayArray with 2 Point objects that define the mirror line
clonetrueboolWhether to clone mirrored points and or paths
pointsarrayAn array of pointnames, the names of Points in the points array to mirror
pathsarrayAn array of pathnames, the names of Paths in the paths array to mirror
prefixmirroredstringA prefix to apply to the names of the clones points and or paths. Ignored if nameFormat is set
nameFormatfunctionA method that receives the name of the path or point as a first argument and one of path or point as the second argument and should return the name for the cloned path and or point