Documentation
    Preparing search index...

    Interface SceneNodeDocument

    One node of the scene tree (§6, §79).

    Optional fields are absent at their defaults, exactly as in TransformDocument. id is optional because a hand-authored document may leave identity to the engine; a document this package writes always carries one, because §79 requires that a deserialized node keep the id it was saved with.

    interface SceneNodeDocument {
        children?: readonly SceneNodeDocument[];
        components?: readonly ComponentDocument[];
        data?: JsonValue;
        enabled?: boolean;
        id?: string;
        metadata?: JsonObject;
        name?: string;
        opacity?: number;
        tags?: readonly string[];
        transform?: TransformDocument;
        transformAuthority?: TransformAuthority;
        type: string;
        visible?: boolean;
    }
    Index
    children?: readonly SceneNodeDocument[]

    Children in insertion order (§6); absent means none.

    components?: readonly ComponentDocument[]

    Components in registration order (§6a); absent means none.

    data?: JsonValue

    The node's subclass state, opaque to this package (§79, 2026-08-06).

    Whatever SerializeSceneOptions.nodeDataOf returned for the node — a camera's projection parameters, a widget's box model and accessibility record — carried verbatim and handed straight back to InstantiateSceneOptions.nodeFactory, which receives this whole document. Validated as JSON and nothing more: this module has no idea what a "ui:button" is, which is precisely why a document can carry one written by a build that did.

    Distinct from SceneNodeDocument.metadata, and deliberately: §6's metadata is the application's free-form data and belongs to whoever authored the scene, so an engine writing its own fields into it would both collide with that data and lose the ability to tell the two apart.

    Absent means the node had none, which is every node whose class this build treats as plain — so a document produced without a nodeDataOf is unchanged by this field's existence.

    enabled?: boolean

    §6 enablement; absent means true.

    id?: string

    Stable node id (§6, §79); unique within the document.

    metadata?: JsonObject

    §6 free-form user data; absent means empty. Must be representable JSON.

    name?: string

    Human-readable name (§6); absent means "".

    opacity?: number

    §6 opacity; absent means 1. Not range-checked, as Node does not clamp.

    tags?: readonly string[]

    §6 tags in insertion order, without duplicates; absent means none.

    transform?: TransformDocument

    Local transform (§7); absent means the identity transform.

    transformAuthority?: TransformAuthority

    Which system owns the transform (§42); absent means "manual".

    type: string

    The node's type name — "scene", "group", or an application's own.

    visible?: boolean

    §6 visibility; absent means true.