Repository navigation
Scene Documents
A SceneDocument contains:
-
version: 1: required format version. -
spaces: named coordinate spaces, each with anobjectsarray. -
parameters: optional named numeric values shared across spaces. -
events: optional animation tracks. -
duration: optional explicit timeline length in seconds. -
theme: optional document-level colors; a space can override these.
The first space is initially active. The default duration is the latest event endpoint. Set an explicit duration when geometry uses t without animation events.
| Space | Native coordinates | View |
|---|---|---|
axis1d |
[x] |
Number line |
plane2d |
[x, y] |
Cartesian plane |
polar2d |
[radius, angle] |
Polar plane |
space3d |
[x, y, z] |
3D scene |
Angles use radians. Geometry is converted to Cartesian coordinates for transforms and rendering. A FunctionGraph describes Cartesian y = f(x) and a PolarGraph describes r = f(theta). Primitive lengths and radii are Cartesian distances.
Space settings include axes, ticks, grid, camera and theme. axes can be a boolean or axis-name array. Camera settings include center, scale, and, for 3D, position and projection (perspective or orthographic).
An object's style supports color, opacity, fillOpacity, strokeWidth, pointSize and fontSize. Use six-digit hex colors such as #58a6ff; opacity values are between zero and one.
Document/space themes support background, foreground, axes, grid and an objectColors palette. Explicit object colors take precedence over the palette. The older builder API has a different theme shape; do not pass its theme options unchanged into scene documents.
- Installation and development
- Browser quick start
- Scene documents
- Objects and expressions
- Document field reference
- Complete object reference
- Animation
- All animations and events
- Interaction and multiple views
- Browser player API
- Headless evaluation and validation
- Integration and lifecycle
- Features and limitations
- Publishing Webnim
- Troubleshooting
- Reference files