Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...
    interface NodeBuildCtx {
        registry: LoaderRegistry;
        lineWorkingSetGate: LineWorkingSetGate;
        lodGroupRegistry?: LODGroupRegistry;
        nodeFactory: NodeFactory;
        viewState: ViewState;
        getViewVersion(): number;
        factoryDeps: LoaderFactoryDeps;
        applyEffectiveAttrs(
            node: SceneNode,
        ): {
            transform?: readonly number[];
            nd_transform?: NdTransformMap;
            opacity?: number;
            absorption?: number;
            gamma?: number;
            intensity?: number;
            offset?: number;
            blending_mode?: string;
            join?: string;
            max_radius?: number;
            n_points?: number;
            layer?: boolean;
            visible?: boolean;
            color_data_range?: [number, number];
            amplitude_data_range?: [number, number];
            scalar_data_range?: [number, number];
            colormap?: string;
            has_scalars?: boolean;
            extend_to_all?: string[];
            [key: string]: unknown;
        };
        deriveNodeViewState(
            path: string,
            attrs: { extend_to_all?: string[] } | undefined,
            opts: DeriveOpts,
        ): DerivedNodeViewState;
        connectLoaderToMonitor(
            path: string,
            loader: DataLoader | LinesDataLoader | GSplatsDataLoader | MeshDataLoader,
        ): void;
        kickRefinementIfIdle(): void;
        reportArchiveFault(fault: ArchiveFaultError): void;
        isDatasetLive(): boolean;
        releaseLazyGSplats(path: string): void;
        releaseLazyPoints(path: string): void;
        releaseLazyLines(path: string): void;
        releaseLazyMesh(path: string): void;
        processPointsData(path: string, data: LoadedPointsData): StagedPointsCommit;
        commitPointsGeometry(
            staged: StagedPointsCommit,
            session?: UpdateSession,
            loadedViewVersion?: number,
        ): void;
        processLinesData(
            path: string,
            data: LoadedLinesData,
            viewState: ViewState,
            session?: UpdateSession,
        ): Promise<StagedLinesCommit | null>;
        commitLinesGeometry(
            staged: StagedLinesCommit,
            session?: UpdateSession,
            loadedViewVersion?: number,
        ): void;
        processGSplatsData(
            path: string,
            data: LoadedGSplatsData,
            viewState: ViewState,
            session?: UpdateSession,
        ): Promise<StagedGSplatsCommit | null>;
        commitGSplatsGeometry(
            staged: StagedGSplatsCommit,
            session?: UpdateSession,
            loadedViewVersion?: number,
        ): void;
        processMeshData(
            path: string,
            data: LoadedMeshData,
            viewState: ViewState,
            attrs: Pick<
                MeshMetadata,
                "normal_dims"
                | "double_sided"
                | "extend_to_all"
                | "slab_tolerance",
            >,
        ): Promise<StagedMeshCommit>;
        commitMeshGeometry(
            staged: StagedMeshCommit,
            session?: UpdateSession,
            loadedViewVersion?: number,
        ): void;
    }
    Index
    registry: LoaderRegistry

    Shared loader bookkeeping (registration + failure recording).

    lineWorkingSetGate: LineWorkingSetGate

    Shared line working-set admission for this SceneLoader session.

    lodGroupRegistry?: LODGroupRegistry

    Per-scene LOD-group registry. Optional — when absent, lod_group nodes still load (default level renders) but the per-frame selector is a no-op. Set by SceneLoader when the scene supports LOD-group selection.

    nodeFactory: NodeFactory

    THREE.js node factory for placeholder construction.

    viewState: ViewState

    Snapshot of the orchestrator's viewState at the time the leaf is invoked. Captured by value so a concurrent updateView mutating the orchestrator's field doesn't corrupt the initial-load query region.

    NOTE: for a DEFERRED reload (a lazy lod_group level re-fired after the user scrubbed) this snapshot is stale — the reload paths re-run deriveNodeViewState() (from the orchestrator's live view state) to load for the CURRENT slice.

    factoryDeps: LoaderFactoryDeps

    Factory-deps snapshot for createX*Loader helpers.

    • The orchestrator's CURRENT view-update version (live, not the snapshot). A deferred / registry-driven reload captures this at derive-time and stamps the committed geometry with it (see the commit callbacks below) so the LOD registry's freshness check reflects the slice actually loaded.

      Returns number

    • Compose effective rendering attrs along the scene-graph ancestry.

      Parameters

      Returns {
          transform?: readonly number[];
          nd_transform?: NdTransformMap;
          opacity?: number;
          absorption?: number;
          gamma?: number;
          intensity?: number;
          offset?: number;
          blending_mode?: string;
          join?: string;
          max_radius?: number;
          n_points?: number;
          layer?: boolean;
          visible?: boolean;
          color_data_range?: [number, number];
          amplitude_data_range?: [number, number];
          scalar_data_range?: [number, number];
          colormap?: string;
          has_scalars?: boolean;
          extend_to_all?: string[];
          [key: string]: unknown;
      }

      • [key: string]: unknown

        Any additional attributes

      • Optionaltransform?: readonly number[]

        Transformation matrix (16 elements for a column-major 4x4 matrix). Typed as readonly number[] because zarr metadata is parsed dynamically; see import('../types/zarr').Matrix4x4 for the narrowed 16-tuple shape.

      • Optionalnd_transform?: NdTransformMap

        Per-dimension transforms for non-displayed dimensions

      • Optionalopacity?: number

        Rendering attributes

      • Optionalabsorption?: number
      • Optionalgamma?: number
      • Optionalintensity?: number
      • Optionaloffset?: number
      • Optionalblending_mode?: string
      • Optionaljoin?: string

        Lines-only join style at degree-2 polyline joints: 'none' | 'miter' (#790).

      • Optionalmax_radius?: number
      • Optionaln_points?: number
      • Optionallayer?: boolean

        Whether this node is exposed as a layer in the Layers panel

      • Optionalvisible?: boolean

        Initial visibility when the scene loads (default: true). Authoring-time only.

      • Optionalcolor_data_range?: [number, number]

        Min/max of color data, computed at encoding time

      • Optionalamplitude_data_range?: [number, number]

        Min/max of amplitude data (GSplats), computed at encoding time

      • Optionalscalar_data_range?: [number, number]

        Min/max of scalar data (Points/Lines), computed at encoding time

      • Optionalcolormap?: string

        Colormap name for scalar-to-color mapping (e.g., "viridis", "green", "custom")

      • Optionalhas_scalars?: boolean

        Whether this node has scalar values for colormap lookup

      • Optionalextend_to_all?: string[]

        Dimensions to extend visibility across (points visible at all values)

    • Kick the progressive refinement orchestrator if no update holds the serialization lock (re-checks next frame when one does). Called after a deferred lod_group SUBTREE activation registers new sweep loaders — refinement is otherwise only scheduled at update-view tails, so without this the freshly-activated branch would sit at its first additive chunk per part until the next slice change. See SceneLoader.kickRefinementIfIdle.

      Returns void

    • True while the dataset that created this ctx is still the live one. Returns false once that dataset has been aborted/disposed or replaced by a later loadScene. Deferred loads (e.g. lazily-loaded lod_group levels triggered after initial load returns) MUST check this before committing geometry, so a load in flight when the user switches datasets never writes into a disposed/replaced scene.

      Returns boolean

    • Release a lazily-loaded gsplats level's GPU geometry back to the evictable buffer pool and unregister its loader. Called when the lod_group selector swaps away from a substitutive level, so resident geometry stays bounded to ≈ the visible set rather than accumulating every level ever shown. The raw chunks remain in the decompressed cache, so re-selection re-projects cheaply (no network).

      Parameters

      • path: string

      Returns void

    • Release a lazily-loaded points level's GPU geometry back to the evictable buffer pool and unregister its loader. Peer of :meth:releaseLazyGSplats for points lod-group children (the finest level of a points-substitutive ladder). Raw chunks remain in the decompressed cache, so re-selection re-projects cheaply.

      Parameters

      • path: string

      Returns void

    • Release a lazily-loaded lines level's GPU geometry back to the evictable buffer pool and unregister its loader. Peer of :meth:releaseLazyPoints / :meth:releaseLazyGSplats for lines lod-group children (the finest level of a lines-substitutive ladder).

      Parameters

      • path: string

      Returns void

    • Demotion hygiene for a lazily-loaded mesh level. Peer of the three above in WHEN it is called and deliberately not in WHAT it does: a mesh is pooled: false (an indexed BufferGeometry, not the instanced-quad stack), so there is no evictable buffer to hand back and no pool adapter to hand it to. What it does share is the depth-sort release — mesh is depthSortable, so a demoted level would otherwise keep its coordinator state and its worker-side centroid copy alive for a level that is no longer drawn, which is precisely the memory a ladder exists to avoid holding.

      Parameters

      • path: string

      Returns void

    • Project + stage a loaded mesh. Async only because backend selection is; there is no worker RPC to decline, so unlike the lines/gsplats processors this one never resolves to null and callers need no staged null-check.

      Parameters

      • path: string
      • data: LoadedMeshData
      • viewState: ViewState
      • attrs: Pick<
            MeshMetadata,
            "normal_dims"
            | "double_sided"
            | "extend_to_all"
            | "slab_tolerance",
        >

      Returns Promise<StagedMeshCommit>