Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Interface ProcessedLinesData

    interface ProcessedLinesData {
        startPositions: Float32Array;
        endPositions: Float32Array;
        startColors: Float32Array;
        endColors: Float32Array;
        startWidths: Float32Array;
        endWidths: Float32Array;
        startSharpness: Float32Array;
        endSharpness: Float32Array;
        segmentLengths: Float32Array;
        startJointCode: Float32Array;
        endJointCode: Float32Array;
        startScalars?: Float32Array<ArrayBufferLike>;
        endScalars?: Float32Array<ArrayBufferLike>;
        startAlphas?: Float32Array<ArrayBufferLike>;
        endAlphas?: Float32Array<ArrayBufferLike>;
        segmentCount: number;
        bounds?: LinesProjectionBounds;
        elementIds?: Uint32Array<ArrayBufferLike>;
    }
    Index
    startPositions: Float32Array

    Segment start positions in 3D display space (M * 3)

    endPositions: Float32Array

    Segment end positions in 3D display space (M * 3)

    startColors: Float32Array

    Start vertex colors RGB (M * 3), interpolated if clipped

    endColors: Float32Array

    End vertex colors RGB (M * 3), interpolated if clipped

    startWidths: Float32Array

    Start vertex widths (M,), interpolated if clipped

    endWidths: Float32Array

    End vertex widths (M,), interpolated if clipped

    startSharpness: Float32Array

    Start vertex sharpness (M,), interpolated if clipped

    endSharpness: Float32Array

    End vertex sharpness (M,), interpolated if clipped

    segmentLengths: Float32Array

    3D segment lengths (M,), used for cap factor calculation

    startJointCode: Float32Array

    Per-endpoint joint code for the start endpoint (M,): how the line shader should treat it, and — at an ordinary two-segment joint — which segment it joins. 0 free polyline end (keep the soft cap); -1 slice-clipped (suppress the cap; no neighbour will arrive); -2 degree->=3 hub (keep the cap); +(slot + 1) joins visible segment slot at that segment's START; -(slot + 3) joins it at that segment's END.

    slot indexes the VISIBLE stream, which is exactly a line-texture storage slot, so it needs no adjustment when the depth-sort worker permutes draw order. Purely topological: the bend angle is measured in screen space by the vertex stage, per frame, so it tracks the camera.

    Produced by compute_joint_codes — see wasm/rust/src/lines_clipping.rs for the derivation.

    endJointCode: Float32Array

    Same for the end endpoint (M,).

    startScalars?: Float32Array<ArrayBufferLike>

    Start-vertex scalar values (M,), interpolated if clipped, optional.

    present when the source LoadedLinesData.scalars is non-null. Written into texel5.x of the line texture and used by the line vertex shader under USE_COLORMAP (presence rides the userData.hasScalars stamp — the fixed 6-texel layout always has the slot).

    endScalars?: Float32Array<ArrayBufferLike>

    End-vertex scalar values (M,), interpolated if clipped, optional. Written into texel5.y.

    startAlphas?: Float32Array<ArrayBufferLike>

    Start-vertex opacity alphas (M,), interpolated if clipped, optional. Present when the source colors carry an RGBA alpha column (LoadedLinesData.colorComponents === 4); normalized to [0, 1] float regardless of the source color dtype. Written into texel5.z; presence rides the userData.hasElementAlpha stamp (gates only the volumetric w(a) optical-depth map).

    endAlphas?: Float32Array<ArrayBufferLike>

    End-vertex opacity alphas (M,), interpolated if clipped, optional. Written into texel5.w.

    segmentCount: number

    Number of visible segments after clipping

    Fused-scan cull metadata from projection (AABB over start+end positions + max finite width — see LinesProjectionBounds). Mirrors the Points metadata.bounds / gsplats bounds pattern: when present, computeLineBounds skips its O(N) per-segment scan; absent (zero visible segments, or a producer that didn't scan) ⇒ scan fallback. Plain scalars so the object survives the worker structured clone.

    elementIds?: Uint32Array<ArrayBufferLike>

    Slot → ON-DISK element index map for per-element label lookups (M,), composed at projection time by data-processor-lines.ts.

    Indexed by the VISIBLE SEGMENT slot the lines pick shader reports (the line-texture texel row); the value is the on-disk sorted VERTEX row of that segment's START vertex, because line labels are per-vertex and their CSR is keyed by that row. A segment has two endpoints and the pick id is a flat vertex-stage varying, so exactly one of them can be reported — see the convention note in data-processor-lines.ts.

    Absent ⇒ identity / unavailable: picking falls back to the raw slot. That happens for a node with no label CSR (no vertexRangeBounds published), and whenever the composition inputs were inconsistent (fail closed). The commit stamps it onto the MESH (types/committed-data::setElementIdMap), never onto the loaded payload — that payload may be a SliceCache-owned snapshot.