@twinfinity/core
    Preparing search index...

    Interface SegmentSlab

    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 i refers 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 after upload() 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.

    interface SegmentSlab {
        arcOffset: Float32Array;
        color: Float32Array;
        count: number;
        entityId: Uint32Array;
        extent: {
            maxX: number;
            maxY: number;
            maxZ: number;
            minX: number;
            minY: number;
            minZ: number;
        };
        layerIdx: Uint8Array;
        linetypeIdx: Uint8Array;
        segEnd: Float32Array;
        segStart: Float32Array;
        width: Float32Array;
    }
    Index

    Properties

    arcOffset: Float32Array

    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.

    color: Float32Array

    Per-segment RGB in [0, 1], interleaved r,g,b. Length = capacity * 3.

    count: number

    Number of populated segments. May be less than the backing arrays' capacity.

    entityId: Uint32Array

    Per-segment entity id. Available for picking / consumer-side identification. Length = capacity.

    extent: {
        maxX: number;
        maxY: number;
        maxZ: number;
        minX: number;
        minY: number;
        minZ: number;
    }

    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.

    layerIdx: Uint8Array

    Per-segment layer index. Available for consumer-side filtering. Length = capacity.

    linetypeIdx: Uint8Array

    Per-segment linetype id (0 = continuous; others map to dash patterns). Length = capacity.

    segEnd: Float32Array

    World-space segment end coordinates, interleaved x,y,z. Length = capacity * 3.

    segStart: Float32Array

    World-space segment start coordinates, interleaved x,y,z. Length = capacity * 3.

    width: Float32Array

    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.