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

    Interface GSplatsRefinementCtx

    Bundle of host references the refinement loop needs. Kept narrow so the loop can be tested with a stub.

    interface GSplatsRefinementCtx {
        objects: ReadonlyMap<string, Object3D<Object3DEventMap> | undefined>;
        viewStateQueue: ViewStateQueue;
        loaders: Map<string, GSplatsDataLoader>;
        deriveNodeViewState(
            path: string,
            attrs: GSplatsMetadata | undefined,
            opts: { applyPartialExtendTolerance: boolean },
        ): { skip: false; viewState: ViewState };
        processGSplats(
            path: string,
            data: LoadedGSplatsData,
            viewState: ViewState,
            session?: UpdateSession,
        ): Promise<StagedGSplatsCommit | null>;
        commitGSplats(staged: StagedGSplatsCommit, session?: UpdateSession): void;
        profiler?: UpdateProfiler | null;
        updateVisibleCountsInMonitor(): void;
        releaseLock(): void;
        retriggerUpdate(pendingState: Partial<ViewState>): void;
        isActive?(): boolean;
        signal?: AbortSignal;
        residencyBudget?: RefinementResidencyBudget;
    }
    Index
    objects: ReadonlyMap<string, Object3D<Object3DEventMap> | undefined>

    Scene objects already resolved by the phase eligibility sweep.

    viewStateQueue: ViewStateQueue
    loaders: Map<string, GSplatsDataLoader>
    profiler?: UpdateProfiler | null

    Profiler for background-pass accounting. Each per-loader refinement step opens a 'LOD Refinement' pass root (its own persistent tree, separate from 'Total Update') with a per-node child session threaded through load → process → commit.

    signal?: AbortSignal

    Per-refinement-run abort signal. The orchestrator assigns the run's controller to the SceneLoader's _updateAbortController, so a superseding updateView (or dispose) aborts in-flight refinement chunk reads MID-PASS instead of waiting out the whole pass. An AbortError in the per-loader catch is cancellation, not failure.

    residencyBudget?: RefinementResidencyBudget

    Shared residency ceiling for sweep-registered progressive leaves. Absent = unbounded (today's behaviour).

    • Release the SceneLoader's _updateInProgress lock. Called when the loop completes normally (no more LODs). On cancellation the loop hands off the lock to retriggerUpdate's rAF callback instead.

      Returns void

    • Re-enter SceneLoader.updateView() with the pending state. Called once on cancellation; this callback is responsible for releasing the lock AND triggering the new update (typically at the next rAF boundary so the cancelled paint resolves first).

      Parameters

      Returns void