Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...
    Index
    shadows: Map<string, Promise<AnyDataLoader>> = ...

    Lazily-built shadow loaders, keyed by node path (async: progressive factories open zarr subgroups). A failed build is dropped so the next prefetch retries instead of caching the rejection forever.

    controller: AbortController | null = null

    Abort controller for the in-flight prefetch batch (null when idle).

    inFlight: number = 0

    Number of shadow passes still running in the current batch. A new prefetch() call is a no-op while this is > 0: a cold LOD level outlives one playback frame, so letting the in-flight batch finish (each pass deepens its node's ladder by ~1 level per pass and stores it) — instead of aborting + restarting every tick — is what lets cached quality climb across loops. The next free tick re-targets at the current predicted view. A stall guard (MAX_BATCH_STALL_MS) supersedes a batch that never settles, so a hung task can't pin this > 0 for the whole session.

    batchStartMs: number = 0

    performance.now() when the in-flight batch started (for the stall guard).

    disposed: boolean = false
    • Fire one background prefetch batch for viewState (the PREDICTED next view) — one shadow pass per registered node. Fire-and-forget; never await this from a foreground path.

      Persistent across ticks: if the previous batch is still running this is a no-op (see inFlight). Each shadow pass deepens its node's cached ladder by ~1 cold level per pass (the budgetMs deadline stops it after the level it was on, which is stored incrementally) and returns; the next free tick re-targets at the then-current predicted view. Over successive playback loops this fills the SliceCache toward full ladders so revisits hit the fast single-concat path — while the foreground stays responsive.

      Parameters

      • viewState: ViewState

        Full predicted view state (t+1 slice position).

      • budgetMs: number

        Per-pass LOD time budget. Bounds how far a single pass deepens (≈1 cold level); progressive loaders store each level as it lands, so an abort (playback end / dataset switch) keeps the depth already reached.

      • OptionalladderDepth: number | "auto"

      Returns void

    • Abort the in-flight shadow batch. Called on playback end / dataset switch / dispose (NOT on every foreground tick — the batch is meant to persist so background deepening completes; see the note in SceneLoader.updateView).

      Returns void

    • Parameters

      • tasks: Promise<void>[]
      • loaders: ReadonlyMap<string, unknown>
      • kind: LoaderTypeName
      • request: {
            viewState: ViewState;
            budgetMs: number;
            ladderDepth?: number | "auto";
            signal: AbortSignal;
        }
      • resolveObject: (path: string) => Object3D<Object3DEventMap> | null | undefined

      Returns void

    • Derive the per-node state and run one shadow load. Returns a promise that settles when the pass finishes (or is skipped/aborted) so the batch can reopen the inFlight gate; it never rejects (errors are logged).

      Parameters

      • path: string
      • kind: LoaderTypeName
      • request: {
            viewState: ViewState;
            budgetMs: number;
            ladderDepth?: number | "auto";
            signal: AbortSignal;
            object: Object3D<Object3DEventMap> | null | undefined;
        }
        • viewState: ViewState
        • budgetMs: number
        • OptionalladderDepth?: number | "auto"

          Pinned playback ladder depth, forwarded so the t+1 entry carries the pinned prefix.

        • signal: AbortSignal
        • object: Object3D<Object3DEventMap> | null | undefined

      Returns Promise<void>