OptionalrefRegistry: ArrayRefRegistryOptionalzarrStore: ReadableOptionall0Cache: DecompressedChunkCacheOptionalprefetcher: ChunkPrefetcherOptionalsliceCache: SliceCachePrivatechunkPrivatezarrPrivatenodePrivate_PrivaterangePrivatezarrPrivate_Private_Private_PrivatecolorColor layout of this dataset: 3 (RGB) or 4 (RGBA, alpha = per-splat opacity).
Privatel0Private_Private_PrivateprefetcherPrivateslicePrivate_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
Initialize metadata once without loading any attribute payload chunks.
Load 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 runWithResidencyProbe).
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.
PrivatetoleranceThe 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 decoding.
Uses planned visible ranges when supplied; otherwise performs the same spatial index query as updateView(). Issues zarr get() calls for each visible range on every array. The fetched data populates the HTTP cache and L0 decompressed-chunk cache but is NOT accumulated into output buffers — the typed-array results are immediately discarded. This makes the subsequent updateView() call a fast cache hit without the memory cost of allocating full-size output arrays that would only be thrown away.
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: