Remap each global vertex index in segmentData to its local position in the
concatenated, loaded vertex buffer, writing results into out (must have
length >= segmentData.length). mergedVertexRanges must be sorted ascending
and pairwise-disjoint, as produced by mergeRanges(computeVertexRangesFromIndices(...)).
Returns the total local vertex count (the sum of the range widths).
Uses a prefix-offset table + binary search over the ranges rather than a
global->local Map: V8 caps a Map at 2^24 entries and throws, so a lines
node with more than 2^24 unique vertex indices otherwise failed to load at
the remap stage even after the dedupe was fixed (issue #1049). Throws if a
segment references an index outside the loaded ranges.
Remap each global vertex index in
segmentDatato its local position in the concatenated, loaded vertex buffer, writing results intoout(must have length >= segmentData.length).mergedVertexRangesmust be sorted ascending and pairwise-disjoint, as produced bymergeRanges(computeVertexRangesFromIndices(...)). Returns the total local vertex count (the sum of the range widths).Uses a prefix-offset table + binary search over the ranges rather than a global->local
Map: V8 caps aMapat 2^24 entries and throws, so a lines node with more than 2^24 unique vertex indices otherwise failed to load at the remap stage even after the dedupe was fixed (issue #1049). Throws if a segment references an index outside the loaded ranges.