Luxar Viewer API Documentation - v2026.10.19
    Preparing search index...

    Module data/scene-loader/view-state/scene-node-index

    Path index over a loaded scene graph: path → { node, worldNdTransform }.

    Every view derivation needs the node at a path and the world nD transform composed from the root down to it. Walking the graph for each (computeWorldNdTransform, a depth-first search from the root) made one pass O(N²) on a many-part partition: every part's derivation walked every other part. The SceneNode graph is built once by buildSceneGraph and never mutated afterwards (deferred activations build THREE objects and loaders, not SceneNodes), so the index is computed once, right after the build, and every lookup is O(1). The same pass records each node's ancestor chain, so attribute composition (effective-attrs.ts) costs O(depth) per node rather than a linear children.find descent per level.

    Results are identical to the walk: a path that occurs twice resolves to its first occurrence in depth-first pre-order (the walk's first match), an unknown path has the identity transform ({}), and a node reached twice — a cycle or a shared subtree — is refused with the walk's error.

    SceneNodeIndex
    IndexedSceneNode