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

    Type Parameters

    Index
    rungs: TRung[]
    nLods: number
    path: string
    sliceCache: SliceCache | null
    energyTable: readonly number[] | null
    loadedLODs: TData[] = []
    payloadLevelStarts: number[] = []
    loadedCount: number = 0
    lastViewState: ViewState | null = null
    initialLoadDone: boolean = false
    lastResident: boolean = true
    disposed: boolean = false
    resetGeneration: number = 0
    concatCache: { generation: number; lodCount: number; result: TData } | null = null
    levelsAtPassStart: number = 0
    payloadsAtPassStart: number = 0
    restoredFullLadderAtPassStart: boolean = false
    retryFoldedPass: boolean = false
    restoredOrigin: SliceCacheOrigin | null = null
    metadataWarmStarted: boolean = false
    lookahead: AbortController | null = null
    lookaheadLevels: Set<number> = ...
    readAheads: { view: ViewState; controller: AbortController }[] = []

    Speculative ±1-slice read-ahead of rung 0 (B5), one controller per neighbour slice. A view change aborts every one EXCEPT the slice it moved onto: that warm is what the new pass's rung-0 reads join.

    scrubDims: number[] = []
    frameBudgetMs: number | null = null
    ladderDepth: number | null = null
    • get committedEnergyFraction(): number | null

      Cumulative energy fraction e(k) of the loaded prefix (null without energy stamps, 0 before any rung loads) — read at commit time for the display gate's energy-threshold upgrade release.

      Returns number | null

    • The node's monitor metrics, from its levels' summed counters.

      Two fields are the ladder's, not the levels': memoryUsed adds the memoized cumulative payload, and visibleElements is the current ladder's element count. A level's own counter refreshes only when that level queries, so after a SliceCache restore or a pass pinned short of the loaded depth the deeper levels still hold an earlier slice's count — a sum would report elements that are not on screen.

      Parameters

      Returns LoaderMetrics

    • Discard the rungs the current pass appended, restoring the prefix it started from, so a failed commit's retry re-attempts the SAME prefix (see pass-rollback.ts).

      Returns number

      Rungs discarded (0 when the pass appended none).

    • Bring the ladder to viewState: enter it when it differs from the last view, else adopt a determinant-equal metadata refresh (the fresh dimensions reference keeps later compares on the reference fast path). True when a restored FULL ladder makes the pass a no-op.

      Parameters

      • viewState: ViewState
      • signal: AbortSignal | undefined
      • isPrefetch: boolean

      Returns Promise<boolean>

    • The view changed: departure store, shadow adoption, restore or reset.

      Parameters

      • viewState: ViewState
      • signal: AbortSignal | undefined
      • isPrefetch: boolean

      Returns Promise<boolean>

    • Concatenate the retained payloads, memoized on (reset generation, logical rung count), stamping the prefix-lineage parent (the previous same-generation memo) and, for a result built from a restored snapshot alone, its slice-cache origin. The rungs' pooled decode buffers are released once copied; only the cumulative payload is retained.

      Parameters

      Returns TData

    • Request rung level's spatial index at REFINEMENT priority (B6): a finer rung of something on screen queues behind every demand read but no longer waits for the rung before it to finish. Idempotent.

      Parameters

      • level: number

      Returns void

    • The signal-linked speculative lookahead of the next rung(s): free navigation only — a playback / pinned pass's next pass is a DIFFERENT slice, so this slice's next rung would never be read (measured pure waste) — and never for a superseded pass.

      Parameters

      • viewState: ViewState
      • OptionalupdateSignal: AbortSignal

      Returns void

    • The lookahead controller for this view (the lookahead-signal contract): speculative, aborted on view change and dispose, AND linked to the update that scheduled it. Reused across refinement passes of one view while live; replaced once a superseded update aborted it. null when that update is already aborted.

      Parameters

      • OptionalupdateSignal: AbortSignal

      Returns AbortController | null

    • Parameters

      • level: number
      • viewState: ViewState
      • controller: AbortController
      • Optionalplan: Promise<{ ranges?: readonly unknown[] }>

      Returns void

    • Predictive read-ahead for a scrub (B5): after a pass for a view reached by moving a hidden-dimension slice, warm rung 0 of the neighbouring slices (one step either way along each moved axis), so the next drag step's first commit is a cache hit. Speculative priority, aborted by the next view change; free navigation only (playback has the SlicePrefetcher) and once per view. Each neighbour gets its own controller, so the step that lands on one keeps its read (see cancelSpeculation).

      Parameters

      • viewState: ViewState
      • OptionalupdateSignal: AbortSignal

      Returns void

    • Abort the speculative reads of the view being left. A read-ahead of exactly keepFor (the view being entered) is KEPT: until the new pass's rung-0 read joins it, the warm is the only waiter on its chunk fetches, and aborting it there would cancel the shared fetch and force a refetch.

      Parameters

      Returns void