World-unit arc length from the owning polyline's start to this segment's
start. The renderer uses it to keep dash phase continuous across the
vertices of a polyline instead of resetting at every joint. Standalone
segments (with no polyline membership) leave this at 0. Length = capacity.
Per-segment RGB in [0, 1], interleaved r,g,b. Length = capacity * 3.
Number of populated segments. May be less than the backing arrays' capacity.
Per-segment entity id. Available for picking / consumer-side identification. Length = capacity.
Axis-aligned bounding box of every vertex in [0, count). Producers
are responsible for keeping this in sync with the populated data; the
renderer reads it for picking helpers, the consumer reads it for
camera-fit / recentre helpers.
Per-segment layer index. Available for consumer-side filtering. Length = capacity.
Per-segment linetype id (0 = continuous; others map to dash patterns). Length = capacity.
World-space segment end coordinates, interleaved x,y,z. Length = capacity * 3.
World-space segment start coordinates, interleaved x,y,z. Length = capacity * 3.
Per-segment width. Interpreted as pixels when the renderer's width mode
is screen-space (default) and as world units when it's world-space.
Length = capacity.
Struct-of-arrays container for line segments consumed by
LineRenderer. Coordinates are world-space positions in whatever coordinate system the host scene uses — the renderer makes no assumption about handedness, axis-up, or units.All per-segment arrays are parallel — index
irefers to the same segment across every field. Position arrays are interleaved triples (x0,y0,z0). The slab is the only thing the renderer needs to upload: producers fill it once, the renderer copies what it needs to the GPU and does not retain a reference afterupload()returns.Storage cost is ~56 bytes per segment of pure typed-array data. Building larger slabs directly into typed arrays avoids the ~120 bytes/segment of V8 object overhead an
Array<Segment>would carry.