Scene
Type: object
A scene is a distinct, sequential segment of the movie. Scenes play in the order they appear in the parent movie's scenes array. Scenes cannot overlap in time. Each scene holds its own elements, optional transition, and local variables.
Properties
background-color
Background color of the scene. Hexadecimal value (e.g. #FF0000) or transparent.
| Type | string |
| Required | No |
| Default Value | "#000000" |
cache
If true, a previously rendered version of this scene is reused when its inputs match. If false, the scene is rendered from scratch.
| Type | boolean |
| Required | No |
| Default Value | true |
comment
Free-form note attached to the scene. Ignored by the renderer.
| Type | string |
| Required | No |
condition
Expression evaluated at render time. The scene is included only if the expression is truthy. Empty strings and falsy values cause the scene to be skipped.
| Type | string |
| Required | No |
duration
Scene duration in seconds. -1 makes the scene as long as needed to contain all its elements.
| Type | number |
| Required | No |
| Default Value | -1 |
| Format | float |
elements
Elements rendered inside the scene. Stacking order in the array determines layering — later items render on top.
| Type | array |
| Required | No |
Array items
Each item is one of the element types defined in Element. The discriminator is the type field.
type value |
Schema |
|---|---|
image |
Image element |
video |
Video element |
text |
Text element |
html |
HTML element |
component |
Component element |
audio |
Audio element |
voice |
Voice element |
audiogram |
Audiogram element |
subtitles |
Subtitles element |
id
Unique identifier for the scene. Auto-generated when omitted.
| Type | string |
| Required | No |
| Default Value | "@randomString" |
import
ID of another scene to import. Imported scenes are merged into the current scene by appending their elements array. Useful with templates.
| Type | string |
| Required | No |
iterate
Name of a movie-level variable holding an array. At normalisation time the scene is duplicated once per array item (up to 50). When the item is an object, it becomes the duplicated scene's local variables. Used to generate slideshow-style sequences from data.
| Type | string |
| Required | No |
preload
Assets to fetch or generate before this scene's elements render. Same shape as movie.preload.
| Type | array |
| Required | No |
transition
Transition between this scene and the next.
| Type | object |
| Required | No |
This object contains the following properties:
- type: (string, optional) — Transition family. Currently
xfade. Defaultxfade. - style: (string, optional) — Transition style. Default
fade. Examples:fade,wipeleft,slideup,circleopen,dissolve,pixelize, … - duration: (number, optional) — Length of the transition in seconds.
variables
Scene-local variables. Names follow the same rules as movie.variables. Local variables override parent (movie) values inside the scene.
| Type | object |
| Required | No |
| Default Value | {} |