Fireflies data
Small lights that wander and blink over the whole frame: a night scene with something alive in it.
Props#
| Prop | Type | Default | Notes |
|---|---|---|---|
| count | number (1 to 200) | 28 | |
| color | color | "#e4ffb8" | |
| size | number (2 to 80) | 10 |
* 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": "Fireflies"}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",
"w": "fill",
"h": "fill",
"children": [
{
"$each": "$count",
"node": {
"el": "shape",
"kind": "circle",
"w": "=size*(0.4+rand(index))",
"fill": "$color",
"glow": "$color",
"place": ["=rand(index,1)", "=rand(index,2)"],
"motion": [
{
"do": "drive",
"pose": {
"x": "=noise(t*0.25,index)*110",
"y": "=noise(t*0.21,index+50)*80",
"opacity": "=0.15+0.85*wave(t*(0.18+0.3*rand(index,3))+rand(index,4))"
}
}
]
}
}
]
}