View state for projection. Same ProjectionViewState shape every
project*To3D worker function accepts — keeps the worker API
uniform across node types. All three fields are consumed: the
WASM clip_segments_batch step reads slicePosition + tolerance
displayDims to decide per-segment visibility and to clip
partially-visible segments at the slice boundary.OptionalcolorComponents?: 3 | 4Channels per color entry: 3 (RGB, default) or 4 (RGBA — the alpha
column is per-vertex opacity, volumetric phase 4). When 4, the
worker de-interleaves the coerced colors into an RGB stride-3
array for interpolate_colors_batch (an RGB-only kernel) plus a
stride-1 alpha column routed through interpolate_scalars_batch
(the widths/sharpness/scalars kernel — alpha interpolates
linearly like any scalar), emitting startAlphas/endAlphas.
OptionalemitSourceIndices?: booleanRecord, for every emitted visible slot, which LOADED SEGMENT ROW it came
from (sourceSegmentIndices). Opt-in: it costs 4 B per visible segment
and only a label-carrying node has a reader (issue #1424), so
data-processor-lines.ts sets it exactly when the loader published
vertexRangeBounds. Mirrors emitSourceIndices on the gsplats projection.
Optional per-vertex scalar attribute for colormap-mode Lines. Accepted dtypes:
Float32Array(passes through zero-copy),Float16Array(element-wise expand),Uint8Array(normalized by1/255to align with the colormap shader's[0, 1]contract). Whennullthe worker emits emptystartScalars/endScalarsarrays and the loader leaves the geometry's scalar attribute unallocated.