Drop the current segment data. Releases the per-instance GPU buffers so
VRAM is reclaimed; the JS-side caches are kept so the next upload()
skips their allocation. The renderer remains usable.
Fully tear down the renderer. Releases GPU buffers, drops the JS caches, unsubscribes from scene observers, and disposes the unit-quad mesh and shader material. Do not reuse the instance after calling this.
Idempotent — a second call (e.g. from the scene-dispose hook after a manual dispose) is a no-op.
Current global dash period multiplier.
Reports the renderer's memory footprint.
gpuBytes: per-instance attribute data currently uploaded to GPU.jsBytes: renderer-owned caches that survive across uploads.instanceCount: number of segments currently being drawn.True after dispose() has run (manually or via scene tear-down).
True if the renderer is in world-unit width mode.
Global multiplier on every dash pattern's period.
Default 1.0 means built-in patterns render at the renderer's design defaults (sized for metre-scale worlds). Set higher for larger worlds or to make dashes more prominent; lower to compress them.
When the T8LD pattern primitive ships, patterns will carry their own scale and this becomes an additive multiplier on top — same knob, still useful.
Partial-update style override. Each field is independent:
undefined leaves the corresponding override alone, null clears it,
any other value applies it as the override for every rendered segment.
Toggle width interpretation between screen-space pixels (false, default) and world units (true, depth-attenuated).
Replace the current segment data with slab. Copies what's needed into
the renderer's GPU and JS caches; does not retain slab after
return. Callers that need a CPU-side copy (e.g. for picking) must keep
their own reference.
Passing a slab with count === 0 is equivalent to clear().
Renders an arbitrary count of 3D line segments in a single GPU draw call.
Each segment is one thin-instance of a unit quad; per-instance attributes drive screen-space extrusion, colour, width and dash phase. Dash patterns stay phase-continuous across the joints of a polyline (each segment carries its arc offset from the polyline start).
The renderer makes no assumption about coordinate system, handedness, axis-up, or units. Segment coordinates are passed straight to the GPU as world-space positions in whatever convention the host scene uses.
Lifecycle:
The renderer self-disposes when the host
Sceneis disposed — public methods short-circuit after that. Manualdispose()followed by scene disposal is also safe (double-dispose is a no-op).The renderer never retains the slab passed to
upload(); everything it needs is copied to its own typed-array caches.