chore(markdown): Work on macro reference docs
This commit is contained in:
parent
5a68c74330
commit
403f0c45c2
9 changed files with 277 additions and 113 deletions
|
@ -2,30 +2,47 @@
|
|||
title: bartack
|
||||
---
|
||||
|
||||
The `bartack` macro allows you to add a _bartack_ marker to your sewing pattern.
|
||||
It is provided by the [bartack plugin](/reference/plugins/bartack/).
|
||||
The `bartack` macro allows you to add a _bartack_ marker to your sewing
|
||||
pattern. It is provided by the [bartack plugin](/reference/plugins/bartack/).
|
||||
|
||||
<Example part="plugin_bartack">
|
||||
Example of the bartack macro
|
||||
</Example>
|
||||
## Signature
|
||||
|
||||
```js
|
||||
points.a = new Point(15, 15)
|
||||
|
||||
macro('bartack', {
|
||||
anchor: points.a,
|
||||
angle: 30,
|
||||
length: 15
|
||||
macro('banner', {
|
||||
Point anchor,
|
||||
Number angle=0,
|
||||
Number density=3,
|
||||
Number length=15,
|
||||
String prefix='',
|
||||
String suffix='',
|
||||
Number width=3,
|
||||
})
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
<Example caption="Example of the bartack macro">
|
||||
```js
|
||||
({ macro, Point, part }) => {
|
||||
|
||||
macro('bartack', {
|
||||
anchor: new Point(0,0),
|
||||
length: 25
|
||||
})
|
||||
|
||||
return part
|
||||
}
|
||||
```
|
||||
</Example>
|
||||
|
||||
## Configuration
|
||||
|
||||
| Property | Default | Type | Description |
|
||||
|-------------:|------------|------------|-------------|
|
||||
| `anchor` | | `Point` | The point to start the bartack from |
|
||||
| `angle` | `0` | `number` | The angle under which to draw the bartack |
|
||||
| `density` | `3` | `number` | Controls how close the stitches are togeter |
|
||||
| `length` | `15` | `number` | Length of the bartack |
|
||||
| `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 |
|
||||
| `prefix` | | `string` | A prefix to apply to the names of the generated path and points |
|
||||
| `suffix` | | `string` | A suffix to apply to the names of the generated path and points |
|
||||
| `width` | `3` | `number` | Width of the bartack |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue