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

    Progressive Lines loader.

    Implements

    Index
    loadedLODs: LoadedLinesData[] = []
    _loadedLODCount: number = 0
    lastViewState: ViewState | null = null
    nLods: number
    _initialLoadDone: boolean = false
    _lastAllResident: boolean = true
    _disposed: boolean = false
    _resetGeneration: number = 0
    _concatCache:
        | { generation: number; lodCount: number; result: LoadedLinesData }
        | null = null
    _levelsAtPassStart: number = 0
    _payloadsAtPassStart: number = 0
    _restoredFullLadderAtPassStart: boolean = false
    _retryFoldedPass: boolean = false
    energyTable: readonly number[] | null
    path: string
    sliceCache: SliceCache | null
    _frameBudgetMs: number | null = null
    _ladderDepth: number | null = null

    Pinned rung count for the current pass (ViewState.ladderDepth, the playback "detail" setting), resolved through resolveLadderDepth; null when the pass is not pinned. A pinned pass loads exactly this many rungs, cold or not, and reports hasMoreLODs === false like a budgeted one — the pinned prefix IS the target.

    • get committedEnergyFraction(): number | null

      Cumulative energy fraction e(k) ∈ [0, 1] of the currently loaded LOD prefix — how much of this ladder's total self-energy the committed chunks carry (the additive orderer's own ranking criterion, stamped at build time as lod_stats.energy_fraction_cum). null when the dataset carries no energy stamps; 0 before any LOD loads. Read at commit time by stampLadderComplete (→ the committedEnergyFraction mesh stamp) for the display gate's energy-threshold upgrade release.

      Returns number | null

    • get lastAllResident(): boolean

      Whether the most recently streamed LOD level was fully cache-resident. Drives the monitor's residency indicator. Defaults to true.

      Returns boolean

    • Measured footprint of the loaded ladder, for the shared sweep residency budget (scene-loader/progressive/residency-budget).

      measureLodBytes sums real byteLengths rather than modelling a per-element cost, so this stays correct as payload columns come and go — and correct after the fold, where loadedLODs is one merged payload rather than one entry per rung. That is exactly why the rung count is reported from _loadedLODCount (LOGICAL levels) instead of loadedLODs.length.

      Returns LadderResidency

    • Discard the levels the current pass appended, restoring the ladder to the prefix the pass started from.

      Called by the main-update and refinement catch paths. updateView advances the cursor as each level ARRIVES, but the concat / projection / commit that follows can still throw — classically RangeError: Array buffer allocation failed on a large node. Without this the retry would resume from the advanced cursor and attempt an even larger allocation, and on reaching nLods would flip hasMoreLODs false and strand the node silently. Unwinding makes the retry re-attempt the SAME prefix, so the failure tracker's 3-strike cap can actually be reached and reported.

      Returns number

      Levels discarded (0 when the pass appended none).

    • Concatenate loaded LODs, memoized on (resetGeneration, logical LOD count). An unchanged view state with no new LODs returns the SAME object reference — safe because the result is never mutated downstream (worker projection inputs are structured-cloned, not transferred) — letting the commit pipeline skip no-op re-commits by identity.

      Each fresh result is also stamped with a PREFIX-LINEAGE parent (the previous same-generation memo) via setPrefixParent, so the commit layer can recognise a genuine prefix-extension and take the append fast path (depth-sorting Phase 4 Stage 2). The parent is null for the first level of a generation (a view change bumps the reset generation and resets the logical depth), which is correct — the first commit extends nothing. Mirrors GSplatsProgressiveLoader.

      Parameters

      Returns LoadedLinesData