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

    Function computeVertexRangesFromIndices

    • Compute contiguous vertex ranges from a sorted list of vertex indices.

      Used after loading segment data: each segment references two vertex indices, and we batch the unique sorted indices into runs of consecutive integers so zarr loading touches the minimum number of chunks.

      Accepts any ArrayLike<number> (a plain number[] or the Uint32Array returned by sortedUniqueVertexIndices); it only reads .length and integer indices.

      This is genuinely lines-specific (operates on per-segment vertex indices, not on chunk bounds) and is therefore not in the canonical loaders/spatial-query-builder API.

      Parameters

      • sortedIndices: ArrayLike<number>

      Returns SegmentRange[]