OptionalrefRegistry: ArrayRefRegistryOptionalzarrStore: ReadableOptionall0Cache: DecompressedChunkCacheOptionalprefetcher: ChunkPrefetcherOptionalsliceCache: SliceCachePrivatechunkPrivatetotalPrivate_PrivatezarrPrivatenodePrivate_PrivatearraysPrivaterangePrivate_Private_PrivatecolorComponents per color item, learned from the zarr colors shape at
open time: 3 = RGB, 4 = RGBA (alpha = per-point opacity). Strides
the accumulator buffers and the projection compaction. Mirrors
GSplatsSpatialIndexLoader.colorComponents.
Private ReadonlyeventsPrivate ReadonlymetricsPrivate ReadonlyactivePrivatenextPrivate ReadonlyfacadePrivatetotalPrivatezarrPrivatel0Private_Private_PrivateprefetcherPrivateslicePrivate_PrivateattrsGet node attributes with proper PointsMetadata typing. This provides type-safe access to point node attributes.
PrivateregisterRegister array shape with the prefetcher for upper-bounds checking.
Thin wrapper around the shared registerPointsArrayBounds helper
so the three call sites in initialize() keep their compact form.
Initialize the loader by loading spatial index and opening arrays
Load points data for the given view state
Current view state
Optionalsession: UpdateSession
Optional profiler session for nested timing
PrivateloadUpdate view for a new slice position.
The spatial index makes each reload proportional to the visible ranges, so re-querying those ranges is the canonical update path for now. This keeps buffer ownership and range-cache behavior deterministic.
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: AbortSignalWarm the cache for the given viewState without producing geometry.
Mirrors GSplatsSpatialIndexLoader.prefetchChunks so the dimension
animation controller can fire prefetchChunks(nextSlice) while the
current frame renders, hiding network latency. The returned typed
arrays are discarded — only the L0 + L1 + L2 caches and the prefetch
queue's seen/parsed-cache get populated as a side-effect.
PrivateprefetchPrivatequeryQuery spatial index for visible point ranges.
Tolerance is computed by the points-specific
calculateSpatialQueryTolerance (EffectiveRadiusConfig-aware) and passed
to the canonical SpatialQueryBuilder via its tolerance option. Falls
back to a uniform tolerance derived from viewState.tolerance/maxRadius
for nodes without an EffectiveRadiusConfig.
The builder also handles the extend_to_all short-circuit; we only emit
the defensive metadata-missing warning ourselves.
PrivateallocateAllocate output buffer for decoded data. For encoded arrays, always use Float32Array (decoder output). For direct arrays, match the source dtype.
PrivateloadLoad an array_ref attribute. Delegates to the shared RangeLoader.loadRangesResolvingRef helper, which opens the target, recomputes per-item element count from the target's shape, and runs RangeLoader.loadRanges against it.
actualElementsPerPoint is passed as the non-ref hint; when an
array_ref is in play it's ignored in favour of the target's shape.
PrivateloadLoad color ranges with multi-type support (preserves original_dtype).
Delegates to the shared color-attribute helper used by the lines and
gsplats facades. Handles direct (uint8/uint16/float32 native), encoded
(quantized / LUT / broadcasted decoded to Float32 then cast back to
original_dtype), and array_ref dispatch in one call.
Kept separate from loadRanges (used for positions / radii / sharpness) because:
PrivateloadLoad array data for specified point ranges.
This method handles multiple encoding strategies:
Name of the array to load (positions, radii, sharpness). For colors, use loadColorRanges which delegates to the shared color-attribute helper.
Point ranges to load
Typed array with loaded data, or null if array doesn't exist
PrivatebuildBuild a ProjectionContext from instance fields. Done per-call so
the helpers in point-loader/projection.ts can stay pure with
respect to the loader.
PrivateprojectMain-thread, WASM-accelerated nD → 3D projection. Thin delegate to
projectPointsTo3D in point-loader/projection.ts. The wasm
backend (compiled or TS-reference fallback) is resolved by the caller
via getPointsBackend(ndim).
OptionaltargetBuffers: ProjectionTargetBuffers | nullOptionalscalars: PrivatecreateEmpty-points payload for the "no visible points" branches. Thin
delegate to createEmptyPointsData in point-loader/projection.ts.
Get current metrics
Get active queries
PrivateemitEmit event to listeners. Thin wrapper around LoaderEventEmitter.emit
so the three call sites in this file keep their this.emitEvent(...)
shape; per-listener error isolation lives in the emitter.
PrivateloadLoad spatial_extend_dims from scene_dimensions stored in root zarr attributes.
This derives the spatial extension flags from the scene_dimensions which is
the single source of truth for dimension configuration. Each dimension has
a spatial flag indicating whether points physically extend through it.
For displayed dimensions, we always treat them as spatial (they're in the view plane). For non-displayed dimensions:
Array of booleans indicating spatial extension per dimension, or null if unavailable
Get 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.
Clean up resources
Loader implementation that uses spatial indices for efficient nD queries.
Key features: