Captions function
Captions made from the scene's timed words (its "transcript"). look: karaoke (the line shows, the spoken word lights up and swells), bold (words punch in as they are said, key words coloured), pop (one big word at a time), boxed (a calm caption box that fills in as it is spoken).
Props#
| Prop | Type | Default | Notes |
|---|---|---|---|
| look | enum: karaoke | bold | pop | boxed | "karaoke" | |
| perLine | number (1 to 8) | 3 | words per line |
| size | number (34 to 240) | 78 | |
| color | color | "white" | |
| active | color | "accent2" | the spoken or key word |
| upper | bool | false | |
| outline | color | "black" | a stroke round the letters |
| outlineW | number (0 to 40) | 10 | |
| glow | color | ||
| from | time | caption only the words spoken from here | |
| to | time | …until here | |
| w | number (200 to 1080) | 920 |
* 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": "Captions", "look": "karaoke"}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.