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

    Lines data loader using spatial indices for efficient nD queries.

    Key features:

    • Segment-first loading: segments → vertices
    • Index remapping from global to local indices
    • nD endpoint clipping for partial segment visibility
    • Per-vertex attribute interpolation for clipped segments

    Implements

    Index
    chunkIndex: LinesDualChunkIndex | null = null
    zarrLocation: Location<Readable>
    node: SceneNode
    _onceInit: OnceInit = ...
    rangeLoader: RangeLoader
    zarrStore: Readable | null = null
    _accumulator: LinesDataAccumulator | null = null
    _accumulatorConfig:
        | {
            initialVertexCapacity: number;
            initialSegmentCapacity: number;
            ndim: number;
        }
        | null = null
    _accumulatorReleased: boolean = false
    l0Cache: DecompressedChunkCache | null = null
    _activeProbe: ResidencyAccumulator | null = null
    _activeSignal: AbortSignal | null = null
    prefetcher: ChunkPrefetcher | null = null
    sliceCache: SliceCache | null = null
    _initialLoadDone: boolean = false
    colorComponents: 3 | 4 = 3
    events: LoaderEventEmitter = ...
    metrics: LoaderMetrics
    activeQueries: Map<string, QueryInfo> = ...
    nextQueryId: number = 0
    totalQueryCells: number = 0
    facadeCtx: SpatialFacadeCtx
    arrays: {
        vertices?: Array<DataType, Readable>;
        segments?: Array<DataType, Readable>;
        widths?: Array<DataType, Readable>;
        colors?: Array<DataType, Readable>;
        sharpness?: Array<DataType, Readable>;
        scalars?: Array<DataType, Readable>;
    } = {}

    Type Declaration

    • Optionalvertices?: 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.

    • Thin wrapper around the shared registerLinesArrayBounds helper so the call sites read more naturally than passing the prefetcher and node path on every call.

      Parameters

      • arrayName: string
      • array: Array<DataType, Readable>

      Returns void

    • 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: retaining the pool would keep the second copy that progressive Lines releases here.

      Returns void

    • Warm 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.

      Parameters

      Returns Promise<void>

    • Parameters

      Returns {
          chunkBounds: Float32Array<ArrayBufferLike>;
          chunkCount: number;
          metadata: { ndim: number; chunk_size: number };
      }

    • Load 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).

      Parameters

      • arrayName: string
      • ranges: SegmentRange[]
      • elementsPerVertex: number
      • OptionaltargetBuffer: Float32Array<ArrayBufferLike>

      Returns Promise<Float32Array<ArrayBufferLike>>

    • Load 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.

      Parameters

      • ranges: SegmentRange[]
      • OptionaltargetBuffer:
            | Uint8Array<ArrayBufferLike>
            | Float32Array<ArrayBufferLike>
            | Uint16Array<ArrayBufferLike>

      Returns Promise<
          | Uint8Array<ArrayBufferLike>
          | Float32Array<ArrayBufferLike>
          | Uint16Array<ArrayBufferLike>,
      >