chore(markdown): Restructuring dev docs
This commit is contained in:
parent
9ef46c502a
commit
d42d9a9377
114 changed files with 246 additions and 1462 deletions
42
markdown/dev/reference/api/macros/mirror/en.md
Normal file
42
markdown/dev/reference/api/macros/mirror/en.md
Normal file
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
title: mirror
|
||||
---
|
||||
|
||||
The `mirror` macro allows you to mirror points and/or paths around a mirror line.
|
||||
It is provided by the [mirror plugin](/reference/plugins/mirror/).
|
||||
|
||||
<Example part="plugin_mirror" caption="Example of the mirror plugin" />
|
||||
|
||||
```js
|
||||
points.a = new Point(5,5)
|
||||
points.b = new Point(45,30)
|
||||
points.c = new Point(5,30)
|
||||
points.d = new Point(45,5)
|
||||
points.mid = new Point(25,15)
|
||||
|
||||
|
||||
paths.a = new Path()
|
||||
.move(points.a)
|
||||
.curve(points.b, points.c, points.d)
|
||||
|
||||
macro('mirror', {
|
||||
mirror: [points.b, points.d],
|
||||
points: [points.mid],
|
||||
paths: [paths.a]
|
||||
})
|
||||
|
||||
macro('sprinkle', {
|
||||
snippet: 'notch',
|
||||
on: ['mid', 'mirroredMid']
|
||||
})
|
||||
```
|
||||
|
||||
| Property | Default | Type | Description |
|
||||
|-------------:|------------|------------|-------------|
|
||||
| `mirror` | | `array` | Array with 2 [Point](/reference/api/point) objects that define the *mirror line* |
|
||||
| `clone` | `true` | `bool` | Whether to clone mirrored points and or paths |
|
||||
| `points` | | `array` | An array of [Point](/reference/api/point) objects |
|
||||
| `paths` | | `array` | An array of [Path](/reference/api/path) objects |
|
||||
| `prefix` | `mirrored` | `string` | A prefix to apply to the names of the clones points and or paths. Ignored if `nameFormat` is set |
|
||||
| `nameFormat` | | `function` | A method that receives the name of the path or point and should return the name for the cloned path and or point |
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue