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

    Progressive Points loader.

    Implements

    Index
    loadedLODs: LoadedPointsData[] = []
    _payloadLevelStarts: number[] = []
    _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: LoadedPointsData }
        | null = null
    _levelsAtPassStart: number = 0
    _payloadsAtPassStart: number = 0
    _restoredFullLadderAtPassStart: boolean = false
    _retryFoldedPass: boolean = false
    energyTable: readonly number[] | null
    levelOffsets: readonly number[] | null
    _composeWarned: boolean = false
    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

    • Measured footprint of the loaded ladder, for the shared sweep residency budget (scene-loader/progressive/residency-budget). Sums real byteLengths rather than modelling a per-element cost. Rung count comes from _loadedLODCount (LOGICAL levels), not loadedLODs.length, which is 1 once the ladder has folded.

      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 catches; see ../loaders/progressive/pass-rollback for why a failed commit must not leave the cursor advanced.

      Returns number

      Levels discarded (0 when the pass appended none).

    • Update existing data for a new view state.

      Parameters

      • viewState: ViewState
      • Optionalsession: UpdateSession
      • Optionalsignal: AbortSignal

        Optional per-update abort signal. When it fires (a newer view-state superseded this one), in-flight chunk reads/decodes bail with an AbortError instead of running to completion.

      • OptionalresidencyAllowanceBytes: number

      Returns Promise<LoadedPointsData>

    • Concatenate loaded LODs, memoized on (resetGeneration, 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 empties loadedLODs), which is correct — the first commit extends nothing. Mirrors GSplatsProgressiveLoader.

      Parameters

      Returns LoadedPointsData

    • LoaderMonitor surface (optional, for the data-loading-monitor UI). Mirrors the surface that points-spatial-index-loader.ts exposes — implementations that don't track metrics may omit these methods. Symmetric with LinesDataLoader / GSplatsDataLoader.

      Parameters

      Returns void