DotWave data
A wall of dots with a wave rolling through it diagonally: a living backdrop. Put it first in a stack, behind the words.
Props#
| Prop | Type | Default | Notes |
|---|---|---|---|
| cols | number (2 to 30) | 12 | |
| rows | number (2 to 40) | 18 | |
| size | number (4 to 120) | 30 | |
| gap | number (0 to 120) | 30 | |
| color | color | "accent" | |
| speed | number (-4 to 4) | 0.5 | waves per second |
| spread | number (0 to 1) | 0.08 | how far the wave is delayed per dot |
* required. Every node also takes the common props: id, motion, start, place, scale, rotate, opacity, w, h. A colour is a palette name, never a value.
Parts#
Named parts can be restyled from outside without making a new component: "parts": { "root": { … } }.
| Part | Is a |
|---|---|
| root | box |
Example#
{"el": "DotWave", "color": "accent", "opacity": 0.4}How it is made#
This component is plain data. Its whole definition is the tree below: copy it into a scene's components list under a new name to make your own version. See Custom components.
{
"el": "box",
"cols": "$cols",
"gap": "$gap",
"children": [
{
"$each": "=cols*rows",
"node": {
"el": "shape",
"kind": "circle",
"w": "$size",
"fill": "$color",
"motion": [
{
"do": "drive",
"pose": {
"scale": "=0.2+0.8*wave(t*speed-(index%cols+floor(index/cols))*spread)",
"opacity": "=0.25+0.75*wave(t*speed-(index%cols+floor(index/cols))*spread)"
}
}
]
}
}
]
}