Documentation
    Preparing search index...

    Interface DebugDrawStreams

    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 a BufferGeometry).

    Both arrays are sized exactly for the live segments, which is what BufferGeometry requires: it validates that colors.length is four floats per vertex of positions, so a slack tail is not merely wasteful here, it is rejected (§85).

    interface DebugDrawStreams {
        colors: Float32Array;
        positions: Float32Array;
        resized: boolean;
        segmentCount: number;
        vertexCount: number;
    }
    Index
    colors: Float32Array

    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.

    positions: Float32Array

    x, y, z per vertex, two vertices per segment — segmentCount * DEBUG_POSITION_FLOATS_PER_SEGMENT floats, world space. Feeds BufferGeometry.positions with mode: "lines".

    resized: boolean

    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.

    segmentCount: number

    Segments packed — the source buffer's lineCount at the last update.

    vertexCount: number

    segmentCount * 2 — the vertex count both arrays are aligned to.