2021-10-17 18:26:00 +02:00
|
|
|
---
|
|
|
|
title: sprinkle
|
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-02-19 08:04:25 +01:00
|
|
|
The `sprinkle` macro facilitates adding snippets to your pattern in bulk.\
|
2021-08-25 16:09:31 +02:00
|
|
|
It is by the [sprinkle plugin](/reference/plugins/sprinkle).
|
|
|
|
|
2022-01-18 14:57:14 +01:00
|
|
|
<Example part="plugin_sprinkle">
|
|
|
|
Example of button snippets sprinkled on a pattern by this macro
|
|
|
|
</Example>
|
2021-08-25 16:09:31 +02:00
|
|
|
|
|
|
|
```js
|
|
|
|
macro('sprinkle', {
|
|
|
|
snippet: 'button',
|
|
|
|
on: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']
|
|
|
|
})
|
|
|
|
```
|
|
|
|
|
2022-02-19 08:04:25 +01:00
|
|
|
| Property | Default | Type | Description |
|
2021-08-25 16:09:31 +02:00
|
|
|
|------------:|---------|------------------|-------------|
|
|
|
|
| `snippet` | | String | Name of the snippet to sprinkle |
|
|
|
|
| `on` | `[]` | Array of strings | An array with **the names** of points to add the snippet on |
|
2022-01-18 14:57:14 +01:00
|
|
|
| `scale` | 1 | number | Scale for the individual snippets |
|
|
|
|
| `rotate` | 0 | number | Rotation for the individual snippets |
|