Sequence function
Scenes one after another. Each scene has a length and a node, and seconds written inside a scene count from that scene's start, so a scene can be moved or retimed whole. The scene's "duration" must be at least the sum of the lengths, or the last scenes are never shown. transition: fade, zoom (through a blur), push (sideways), rise, blur, cut.
Props#
| Prop | Type | Default | Notes |
|---|---|---|---|
| scenes* | list | [{len: seconds, node: NODE, transition?: name}, …] | |
| transition | enum: fade | zoom | push | rise | blur | cut | "fade" | |
| mix | number (0 to 2) | 0.4 | seconds a scene overlaps the next |
* 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": "Sequence",
"scenes": [
{"len": 2, "node": {"el": "text", "text": "First"}},
{"len": 2, "node": {"el": "text", "text": "Then"}}
]
}How it is made#
This is one of the 8 components built by a short function, because it makes one node per row, scene or spoken word and data alone cannot loop like that. The function returns the same kind of tree as every other component, so what reaches the renderer is still plain elements and behaviors.