PrivatenumPrivatedimensionsPrivateverticesPrivatewidthsPrivatesegmentsPrivatecolorsPrivatesharpnessSet the number of line segments.
Set the number of spatial dimensions.
Provide explicit vertex data ((numSegments * 2) * dimensions floats).
Generate random vertex data within range.
Set uniform widths.
Set varying widths.
Provide explicit segment indices. If omitted, auto-generates the canonical
[0, 1, 2, 3, ..., 2N-1] packing where each segment takes two consecutive
vertex indices.
Add per-vertex colors as RGB floats. Random when no values are passed.
Optionalcolors: number[] | Float32Array<ArrayBufferLike>Per-vertex sharpness scalars.
Build the test fixture. vertices is auto-populated with random values
if no withVertices/withRandomVertices call preceded build().
widths defaults to a uniform 1.0 if unset (required attribute).
segments defaults to the canonical packing if unset.
Builder for lines test data.
Mirrors the PointsBuilder API: chained
withX()setters and a finalbuild()that returns plain typed arrays + counts. Use this in spatial-index loader, projection, and clipping tests so the test fixtures stay consistent across geometry types.Example