OptionalrefRegistry: ArrayRefRegistryOptionalzarrStore: ReadableOptionall0Cache: DecompressedChunkCacheOptionalprefetcher: ChunkPrefetcherOptionalsliceCache: SliceCachePrivatechunkPrivatezarrPrivatenodePrivate Readonly_Disposed latch, lifetime signal, one-shot initialization and the per-call
demand-load context (lifetime.calls) the wrapped arrays' getChunk reads
through the () => this._lifetime.calls.signal / .probe thunks below
(see LoaderLifetime, ActiveLoadContext).
PrivaterangePrivatezarrPrivate_Private_Private_PrivatecolorColor layout of this dataset: 3 (RGB) or 4 (RGBA, alpha = per-splat opacity).
Privatel0PrivateprefetcherPrivateslicePrivate_Private_Private ReadonlyeventsPrivate ReadonlymetricsPrivate ReadonlyactivePrivatenextPrivatetotalPrivate ReadonlyfacadePrivatearraysConservative whole-rung L0 footprint used to bound speculative ladder lookahead before the exact visible chunk set is known. Zarr scalar types top out at 8 bytes; counting every optional channel and whole stored rung deliberately overestimates sliced/broadcast arrays so lookahead cannot evict more useful cache entries on a large scene.
Live L0 accounting shared by every rung in this progressive ladder.
Resolve visible ranges and estimate the decompressed chunks they retain.
PrivateregisterThin wrapper around the shared registerGSplatsArrayBounds helper
so the call sites read more naturally than passing the prefetcher
and node path on every call.
Initialize the loader by loading spatial index and opening arrays
Optionalsignal: AbortSignalInitialize metadata once without loading any attribute payload chunks.
priority classes the chunk_bounds read of an initialisation THIS call
starts (B6: the progressive loader warms rung k+1 at 'refinement' while
rung k loads). A later call without one needs the index now, so it raises
an in-flight warm to demand — no priority inversion behind a warm. So
the speculative entry points (planPrefetch, prefetchChunks,
prefetchChunkBoundary) pass 'speculative': they are not a frame
waiting on the index, and an untagged call from them would raise a
refinement-class warm to demand.
Runs under the disposed latch (LoaderLifetime.ensureInitialized): a
disposed loader refuses to re-initialize, and one still in flight at
dispose is discarded rather than repopulating the loader.
Optionalpriority: FetchPriorityLoad gsplats data for the given view state
Current view state
Optionalsession: UpdateSession
Optional profiler session for nested timing
PrivateloadUpdate view for new position.
Current view state
Optionalsession: UpdateSession
Optional profiler session for nested timing
Optionalsignal: AbortSignalLike updateView but also reports whether the load was served
entirely from cache (see ActiveLoadContext.runWithProbe).
Optionalsession: UpdateSessionOptionalsignal: AbortSignalPrivateloadProbe the gsplats chunk_bounds array.
Implementation lives in gsplats/chunk-index-loader.ts. The thin
wrapper here exists for symmetry with the points + lines facades,
which follow the same pattern.
Optionalsignal: AbortSignalPrivatetoleranceThe per-node tolerance inputs for queryVisibleSplatRanges, computed once
(see _toleranceOptions).
PrivatequeryQuery visible splat ranges based on view state.
Delegates the chunk-bounds AABB scan and range coalescing to the canonical
SpatialQueryBuilder, which also handles the extend_to_all short-circuit.
Returns a load-all range when no spatial index is available.
PrivateopenOpen the Cholesky factor array(s), supporting both the v3.1 split layout
(cholesky_factors_diag + optional cholesky_factors_offdiag) and the
legacy v3.0 single packed cholesky_factors. The off-diagonal array is
absent for 1D gsplats. Recombination into the packed buffer happens in
loadCholeskyRanges.
PrivateloadLoad Cholesky factors into the packed (N, k) form, recombining the v3.1 split arrays when present. For the legacy single-array layout this is a direct passthrough to loadArrayRanges. On success every packed position is written (diagonal ∪ off-diagonal = all k columns), so a reused target buffer never leaks stale values. The corrupt-file precondition (a d > 1 store missing the off-diagonal array) is checked BEFORE any write, so a throw never leaves the (possibly reused) target buffer half-populated.
Visible splat ranges
Dimensionality (k = ndim*(ndim+1)/2 packed elements/splat)
OptionaltargetBuffer: Float32Array<ArrayBufferLike>
Optional packed output buffer (zero-alloc path)
PrivateloadOptionaltargetBuffer: Float32Array<ArrayBufferLike>PrivateloadLoad color ranges with multi-type support (preserves original_dtype)
This method handles the full encoding/decoding pipeline for colors, including original_dtype restoration for encoded arrays.
OptionaltargetBuffer: PrivateloadPrefetch chunks for the given view state into the cache without producing geometry.
Uses planned visible ranges when supplied; otherwise performs the same
spatial index query as updateView(). Every distinct chunk the visible
ranges touch, on every array, is fetched (L1/L2) and decoded into the L0
decompressed-chunk cache through the proxy's warmChunk — NOT through zarr
get(), so no output selection is allocated or filled, and the demand
load's abort signal and residency probe are not consulted (the warm-up
uses signal only). The subsequent updateView() is then a fast L0 hit.
Optionalsignal: AbortSignalOptionalplannedRanges: readonly SplatRange[]PrivateprefetchGet accumulator stats for memory monitoring
Release pooled decoded buffers after a progressive parent has copied them.
Earlier payloads remain valid because dispose() replaces the accumulator
buffers rather than clearing their old arrays. This deliberately gives up
pooling across view changes to release the progressive ladder's second copy.
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.
PrivateemitClean up resources
GSplats data loader using spatial indices for efficient nD queries.
Key features: