Orbit data
Labelled circles that swing out from the centre one after another and keep circling it. Stack it with something in the middle.
Props#
| Prop | Type | Default | Notes |
|---|---|---|---|
| items* | list of string | ||
| radius | number (60 to 900) | 360 | |
| size | number (60 to 500) | 190 | |
| period | number (-120 to 120) | 14 | seconds per turn; negative turns the other way |
| squash | number (0.1 to 1) | 1 | below 1 makes the ring an ellipse |
| color | color | "accent2" | |
| textColor | color | "ink" | |
| each | number (0 to 2) | 0.14 |
* 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 |
| item | box |
Example#
{"el": "Orbit", "items": ["Research", "Write", "Check", "Post"]}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": "stagger", "each": "$each"}],
"children": [
{
"$each": "$items",
"node": {
"el": "box",
"id": "item",
"dir": "stack",
"w": "$size",
"h": "$size",
"radius": 999,
"fill": "$color",
"shadow": 2,
"motion": [
{"do": "enter", "from": "shrink", "curve": "bouncy"},
{
"do": "orbit",
"radius": "$radius",
"period": "$period",
"phase": "=index/count",
"squash": "$squash"
}
],
"children": [
{
"el": "text",
"text": "$item",
"size": "=max(34,size*0.2)",
"weight": 700,
"color": "$textColor",
"align": "center",
"maxW": "=size-24"
}
]
}
}
]
}