Skip to content

Fluxion JSON / Scene Graph

Fluxion JSON is the editable animation IR shared by the Python DSL and Text DSL. The Runtime does not execute authoring code; it loads the Scene Graph, value trackers, and Timeline from this JSON document.

{
"version": "0.1",
"width": 1280,
"height": 720,
"fps": 60,
"duration": 2,
"camera": { "x": 0, "y": 0, "scale": 1, "rotation": 0 },
"nodes": [],
"values": [],
"timeline": []
}
  • version: Fluxion document format version.
  • width, height, fps: canvas and timeline defaults.
  • duration: optional. When omitted, the Runtime calculates it from the maximum timeline end time.
  • camera: scene-level transform.
  • nodes: initial Scene Graph node data.
  • values: scalar value trackers.
  • timeline: ordered operations applied over time.
{
"id": "c1",
"type": "circle",
"transform": { "x": 220, "y": 360, "scale": 1, "scaleX": 1, "scaleY": 1, "rotation": 0, "opacity": 1 },
"style": { "fill": "#38bdf8", "fillOpacity": 0.8, "stroke": "#0f172a", "strokeOpacity": 1, "strokeWidth": 4 },
"geometry": { "r": 48 },
"children": []
}

Nodes are addressed by id and carry transform, style, geometry, and children. scaleX / scaleY are optional nonuniform scale multipliers and default to 1 when omitted. group nodes contain child nodes, and the camera transform composes outside every node transform.

typePurpose
groupcontainer for child nodes
circlecircle
rectrectangle
lineline segment
pathSVG path data
textplain text
mathLaTeX / KaTeX math

nodes describe structure; timeline describes change over time. Text DSL show statements and Python DSL animation helpers generate operations such as create, set, and animate.

See Timeline for operation details and Web Runtime for seek / playback behavior.