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

    Function loadAndStage

    • Async load + project + stage step for one Mesh node.

      Like Points and GSplats (and unlike Lines), mesh widens tolerance across dimensions the node only partially extends through; see PARTIAL_EXTEND_TOLERANCE.

      DELIBERATE asymmetry vs the Lines/GSplats handlers: there is NO handler-level isAlreadyCommitted no-op fast path here. The mesh loader is whole-node resident and returns the SAME LoadedMeshData reference on every updateView; what varies with the slice is only the nD-slab cull, which lives downstream in processMeshData → projectMeshTo3D. A reference-identity short-circuit would therefore skip re-projection on every slice move — exactly the freeze this sweep exists to prevent. Every sweep must re-project.

      Note the hazard is now LIVE rather than merely pointless: commitMeshGeometry DOES stamp committedData (the depth-sort coordinator reads its presence as "this index buffer still holds the commit whose ordering is resolving"), and the stamped reference is the same one every sweep passes — so adding the fast path here would match on the second sweep and freeze the mesh at its first slice. The stamp is not an identity key for mesh; do not use it as one.

      Parameters

      Returns Promise<StagedMeshCommit | null>