DotField data
A dark field of dots with a soft light that picks them out. x and y (0–1) say where the light is. To make the light follow the action, declare a signal on the scene ("signals": {"hx": [{"at": 0.5, "to": 0.72, "curve": "heavy"}]}) and write "x": "=hx". Use one DotField behind a whole Sequence, not one per scene.
Props#
| Prop | Type | Default | Notes |
|---|---|---|---|
| x | number (-1 to 2) | 0.5 | |
| y | number (-1 to 2) | 0.5 | |
| r | number (20 to 4000) | 360 | |
| cell | number (6 to 300) | 34 | |
| ground | color | "night" | |
| dim | color | "rgba(255,255,255,.07)" | |
| color | color | "accent" |
* 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 |
| light | box |
Example#
{"el": "DotField", "x": "=0.5+0.3*sin(t)", "y": 0.5}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",
"dir": "stack",
"w": "fill",
"h": "fill",
"fill": "$ground",
"children": [
{"el": "box", "w": "fill", "h": "fill", "pattern": "dots", "cell": "$cell", "ink": "$dim"},
{
"el": "box",
"id": "light",
"w": "fill",
"h": "fill",
"pattern": "dots",
"cell": "$cell",
"ink": "$color",
"spotX": "$x",
"spotY": "$y",
"spotR": "$r"
}
]
}