SourceWeb data
A glowing point with lines drawing out to labelled sources around it, one after another: "it is looking things up".
Props#
| Prop | Type | Default | Notes |
|---|---|---|---|
| sources* | list of string | ||
| radius | number (60 to 1200) | 430 | |
| color | color | "accent" | |
| ink | color | "ink" | |
| each | number (0 to 3) | 0.22 |
* 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 |
| core | shape |
| ray | shape |
| source | box |
Example#
{"el": "SourceWeb", "sources": ["your take", "the script", "past edits", "your brand"]}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": [
{
"el": "shape",
"id": "core",
"kind": "circle",
"w": 34,
"fill": "white",
"glow": "$color",
"motion": [
{"do": "enter", "from": "shrink", "curve": "bouncy"},
{"do": "loop", "kind": "pulse", "amount": 4, "period": 1.6}
]
},
{
"$each": "$sources",
"node": {
"el": "box",
"dir": "stack",
"w": 10,
"h": 10,
"children": [
{
"el": "shape",
"id": "ray",
"kind": "rect",
"w": "=radius*(0.62+0.38*rand(index))",
"h": 2,
"fill": "$color",
"opacity": 0.6,
"rotate": "=mod((index/count+0.07)*360,360)-180",
"motion": [
{
"do": "drive",
"pose": {
"x": "=cos((index/count+0.07)*tau-pi)*radius*(0.62+0.38*rand(index))/2",
"y": "=sin((index/count+0.07)*tau-pi)*radius*(0.62+0.38*rand(index))/2"
}
},
{"do": "draw", "curve": "snap"}
]
},
{
"el": "box",
"id": "source",
"dir": "row",
"gap": 12,
"align": "center",
"motion": [
{
"do": "drive",
"pose": {
"x": "=cos((index/count+0.07)*tau-pi)*(radius*(0.62+0.38*rand(index))+90)",
"y": "=sin((index/count+0.07)*tau-pi)*(radius*(0.62+0.38*rand(index))+30)"
}
},
{"do": "enter", "from": "pop", "delay": 0.3, "curve": "punchy"}
],
"children": [
{"el": "shape", "kind": "circle", "w": 16, "fill": "$color"},
{
"el": "text",
"text": "$item",
"size": 30,
"weight": 500,
"font": "mono",
"color": "$ink"
}
]
}
]
}
}
]
}