Straight RGBA per vertex —
segmentCount * DEBUG_COLOR_FLOATS_PER_SEGMENT floats,
index-aligned with DebugDrawStreams.positions. Feeds
BufferGeometry.colors, which an UnlitMaterial reads when its
vertexColors flag is on.
x, y, z per vertex, two vertices per segment —
segmentCount * DEBUG_POSITION_FLOATS_PER_SEGMENT floats, world
space. Feeds BufferGeometry.positions with mode: "lines".
Whether the last debugDrawStreams call replaced the two arrays (because the segment count changed) rather than rewriting them in place.
true means a geometry pointing at the old arrays must be re-pointed at
the new ones; false means an in-place rewrite happened and a
markDirty() is all the geometry needs.
applyDebugDrawStreams does exactly that, so a caller only reads
this flag when it drives its own sink.
Segments packed — the source buffer's lineCount at the last update.
segmentCount * 2 — the vertex count both arrays are aligned to.
A DebugDrawBuffer's contents de-interleaved into the two vertex streams a per-segment-coloured line draw needs — the R-35 bridge, shipped as plain
Float32Arrays (see debugDrawStreams for why they are not aBufferGeometry).Both arrays are sized exactly for the live segments, which is what
BufferGeometryrequires: it validates thatcolors.lengthis four floats per vertex ofpositions, so a slack tail is not merely wasteful here, it is rejected (§85).