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_Privatel0PrivateprefetcherPrivateslicePrivate_PrivatecolorPrivate ReadonlyeventsPrivate ReadonlymetricsPrivate ReadonlyactivePrivatenextPrivatetotalPrivate ReadonlyfacadePrivatearraysOptionalvertices?: Array<DataType, Readable>Optionalsegments?: Array<DataType, Readable>Optionalwidths?: Array<DataType, Readable>Optionalcolors?: Array<DataType, Readable>Optionalsharpness?: Array<DataType, Readable>Optionalscalars?: Array<DataType, Readable>optional per-vertex scalars for colormap lookup.
PrivateregisterThin wrapper around the shared registerLinesArrayBounds helper so
the call sites read more naturally than passing the prefetcher and
node path on every call.
Initialize metadata once without loading any attribute payload chunks,
under the disposed latch (LoaderLifetime.ensureInitialized): a disposed
loader refuses to re-initialize, and an initialization still in flight
when dispose runs is discarded instead of repopulating the loader.
priority classes the chunk_bounds read of an initialization THIS call
starts (B6: a progressive loader warms rung k+1's index at
'refinement' while rung k loads; the speculative entry points pass
'speculative'). A later call without one raises an in-flight warm to
demand.
Optionalpriority: FetchPriorityInitialize the loader by loading spatial index and opening arrays
Optionalsignal: AbortSignalPrivatecreateRelease 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: retaining the pool would keep the second copy
that progressive Lines releases here.
Load lines data for the given view state
Current view state
Optionalsession: UpdateSession
Optional profiler session for nested timing
PrivateloadUpdate view for new position. Note: extend_to_all optimization is handled at scene-loader level, which skips calling this method entirely for fully-extended nodes.
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: AbortSignalWarm the cache for the given viewState without producing geometry.
Mirrors the gsplats / points prefetchChunks(viewState) so a
dimension-animation hook can prefetch the next slice while the
current frame renders. Segments are keyed by segment ranges; vertices,
widths, colors, sharpness, and scalars are keyed by vertex ranges. Querying both
published indexes keeps speculative reads in the same row currency as
the demand path instead of treating segment offsets as vertex offsets.
Each distinct chunk those ranges touch is fetched and decoded into L0 via
the proxy's warmChunk — no zarr get(), so no output selection is
assembled, and the demand load's abort signal / residency probe are not
consulted (see prefetchRangesIntoCache).
Optionalsignal: AbortSignalPrivateprefetchPrivateslicePrivateloadProbe both vertex_chunk_bounds and segment_chunk_bounds from zarr.
Implementation lives in lines/chunk-index-loader.ts. The thin
wrapper here exists for symmetry with the points facade, which
follows the same pattern.
Optionalsignal: AbortSignalPrivatevertexPrivatequeryPrivatequeryQuery visible segment ranges based on view state.
Delegates the chunk-bounds AABB scan and range coalescing to the canonical
SpatialQueryBuilder with geometryType: 'lines'. Returns a load-all
range when no spatial index is available.
PrivateloadLoad segment index data for given ranges
PrivateloadLoad vertex ranges with optional target buffer for zero-allocation operation.
Uses RangeLoader for unified encoding dispatch (broadcasted, quantized, lut, direct). Array references are handled specially (need zarrStore access to resolve target).
OptionaltargetBuffer: 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: PrivatecreateCreate default widths array (all 1.0)
Get accumulator stats for memory monitoring
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
Lines data loader using spatial indices for efficient nD queries.
Key features: