Luxar Viewer API Documentation - v2026.10.19
    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
    pinnedKeys: Map<string, SliceCache> = ...

    Every S-cache key a shadow pass may have pinned, with the cache it was pinned in (see "Pins" in the module doc). Unpinned + cleared by releaseShadows; an over-approximation is harmless because an unpin of an unpinned or absent key is a no-op.

    running: Set<string> = ...

    Node paths whose shadow pass is running (see queueVisible).

    • 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 the deepened ladder once, when the pass finishes; an aborted pass (playback end / dataset switch) stores nothing, and the next pass resumes from the last stored depth.

      • OptionalladderDepth: number | "auto"

      Returns void

    • Shadow-warm the loaders at or under targets for viewState, joining the in-flight batch rather than waiting for it to finish. For loaders registered after that batch enumerated its nodes — a partition part activated for the predicted slice (B4) — which the running batch cannot reach and the next one would warm a whole tick late, i.e. after the foreground already loaded the slice cold.

      Parameters

      • viewState: ViewState
      • budgetMs: number
      • ladderDepth: number | "auto" | undefined
      • targets: ReadonlySet<string>

      Returns void

    • Queue one shadow pass per registered, view-eligible node (restricted to targets when given) under controller's batch, and count them into the in-flight gate until they settle.

      Parameters

      • controller: AbortController
      • viewState: ViewState
      • budgetMs: number
      • ladderDepth: number | "auto" | undefined
      • Optionaltargets: ReadonlySet<string>

      Returns void

    • Abort the in-flight shadow batch. Called by the stall guard, and via releaseShadows on playback end / dispose (NOT on every foreground tick — the batch is meant to persist so background deepening completes). Deliberately keeps the pins: a stall-guard abort happens mid-playback, when the pinned t+1 entries are still about to be consumed.

      Returns void

    • Abort + dispose all shadow loaders (frees their accumulators) and release every pin their passes placed. Called when playback ends; shadows are rebuilt lazily on the next play.

      Returns void

    • Record the key a shadow pass on path will store (and pin) under, and announce its in-flight store so a foreground pass for that key can adopt the result. Returns the release for the in-flight registration.

      Parameters

      Returns () => void

    • Parameters

      • tasks: Promise<void>[]
      • loaders: ReadonlyMap<string, unknown>
      • kind: LoaderTypeName
      • request: {
            viewState: ViewState;
            budgetMs: number;
            ladderDepth?: number | "auto";
            signal: AbortSignal;
            targets?: ReadonlySet<string>;
        }
      • 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>