NamedCursor data
Somebody else's cursor with their name on it, travelling a path: for showing people working in the same place. The path is in pixels from where the cursor is placed ([0,0] is its own spot), so give it "place" and write small offsets such as [[0,0],[140,-60]].
Props#
| Prop | Type | Default | Notes |
|---|---|---|---|
| name* | string | ||
| path* | list of point | ||
| color | color | "accent" | |
| at | time | 0 | |
| seconds | number (0.2 to 20) | 1.4 |
* 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": "NamedCursor", "name": "Alan", "path": [[0, 0], [220, -140]]}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": 10,
"h": 10,
"motion": [
{"do": "enter", "from": "fade", "at": "$at"},
{
"do": "along",
"points": "$path",
"at": "$at",
"curve": {"ease": "inOut", "duration": "$seconds"}
}
],
"children": [
{
"el": "icon",
"name": "cursor",
"size": 54,
"color": "white",
"fill": "$color",
"strokeW": 1.6
},
{
"el": "box",
"radius": 10,
"fill": "$color",
"pad": [4, 14],
"motion": [{"do": "drive", "pose": {"x": 62, "y": 46}}],
"children": [
{
"el": "text",
"text": "$name",
"size": 24,
"weight": 650,
"font": "body",
"color": "white"
}
]
}
]
}