chore: Port FreeSewing.dev to docusaurus
The replaces the NextJS site powering FreeSewing.dev with a Docusaurus setup. It's part of my efforts to simplify FreeSewing's setup so we can focus on our core value proposition.
This commit is contained in:
parent
497633d1d3
commit
ab3204f9f1
692 changed files with 11037 additions and 20674 deletions
58
sites/dev/docs/reference/macros/sprinkle/readme.mdx
Normal file
58
sites/dev/docs/reference/macros/sprinkle/readme.mdx
Normal file
|
@ -0,0 +1,58 @@
|
|||
---
|
||||
title: sprinkle
|
||||
---
|
||||
|
||||
The `sprinkle` macro facilitates adding snippets to your pattern in bulk.
|
||||
|
||||
It is provided by [plugin-sprinkle](/reference/plugins/sprinkle), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('sprinkle', {
|
||||
Array on,
|
||||
Number scale,
|
||||
Snippet snippet,
|
||||
Number rotation,
|
||||
})
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
<Example caption="An example of the sprinkle macro">
|
||||
```js
|
||||
({ Point, points, Path, paths, macro, part }) => {
|
||||
|
||||
points.a = new Point(0,0)
|
||||
points.b = new Point(10,5)
|
||||
points.c = new Point(20,0)
|
||||
points.d = new Point(30,5)
|
||||
points.e = new Point(40,0)
|
||||
points.f = new Point(50,5)
|
||||
points.g = new Point(60,0)
|
||||
|
||||
macro('sprinkle', {
|
||||
snippet: 'button',
|
||||
on: ['a', 'b', 'c', 'd', 'e', 'f', 'g']
|
||||
})
|
||||
|
||||
// Prevent clipping
|
||||
paths.diag = new Path()
|
||||
.move(points.a)
|
||||
.move(new Point(points.g.x, points.g.y + 5))
|
||||
|
||||
return part
|
||||
}
|
||||
```
|
||||
</Example>
|
||||
|
||||
## Configuration
|
||||
|
||||
| Property | Default | Type | Description |
|
||||
|------------:|---------|------------------|-------------|
|
||||
| `snippet` | | String | Name of the Snippet to sprinkle |
|
||||
| `on` | `[]` | Array of strings | Array of pointnames, the names of Points in the `points` array to add the Snippets on |
|
||||
| `scale` | 1 | number | Scale for the individual Snippets |
|
||||
| `rotate` | 0 | number | Rotation for the individual Snippets |
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue