Layers and hierarchy
A flat array, a tree in meaning
The layers array is flat so it is easy to patch, diff and stream. Parent-child relationships are expressed with parentLayerId. Only a group may be a parent, layer ids are globally unique, and higher sibling order paints later.
{
"layers": [
{
"id": "hero-group",
"parentLayerId": null,
"order": 0,
"type": "group",
"frame": { "width": 1080, "height": 1920 },
"transform": { "...": " },
"timing": { "start": 0, "duration": 4000 },
"payload": { "children": ["title", "badge"] }
},
{
"id": "title",
"parentLayerId": "hero-group",
"order": 1,
"type": "text",
"frame": { "width": 720, "height": 120 },
"timing": { "start": 0, "duration": 2400 }
}
]
}
Shared layer contract
Every layer carries id, parentLayerId, order, frame, transform, timing, type and a type-specific payload. Optional fields such as opacity, visibility, clipPath, mask, filter, motion, composite, tracks and effects remain explicit rather than hidden in renderer state.
Certified layer types
| Type | Meaning |
|---|---|
| group | hierarchy, inherited state and optional local 3D context |
| shape | rectangle, circle, ellipse, line, polyline or polygon |
| path | explicit contours and segments |
| text | source, chunks, spans, font and layout semantics |
| image | asset viewport and preserveAspectRatio |
| video | asset range, fit policy and embedded audio controls |