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

    Interface LineTexelSource

    The per-segment arrays the texel writer consumes — the worker projection's Float32 endpoint output (see the module header; the joint codes arrive Float32 too, holding small exact integers).

    interface LineTexelSource {
        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>;
        bounds?: LinesProjectionBounds;
    }

    Hierarchy (View Summary)

    Index
    startPositions: Float32Array

    Segment start positions (count × 3).

    endPositions: Float32Array

    Segment end positions (count × 3).

    startColors: Float32Array

    Start colors RGB (count × 3; projection white-fills when absent).

    endColors: Float32Array

    End colors RGB (count × 3).

    startWidths: Float32Array

    Start widths (count).

    endWidths: Float32Array

    End widths (count).

    startSharpness: Float32Array

    Start sharpness knobs (count; projection fills 0.5 when absent).

    endSharpness: Float32Array

    End sharpness knobs (count).

    segmentLengths: Float32Array

    3D segment lengths (count) — cap-ramp math.

    startJointCode: Float32Array

    Per-endpoint joint code for the start endpoint (count): 0 free end, -1 slice-clipped, -2 degree->=3 hub, +(slot + 1) joins storage slot slot at that segment's START, -(slot + 3) at its END. Drives the vertex stage's join geometry and its cap. See wasm/rust/src/lines_clipping.rs::compute_joint_codes.

    endJointCode: Float32Array

    Same for the end endpoint.

    startScalars?: Float32Array<ArrayBufferLike>

    Colormap scalars per endpoint (count each). Absent ⇒ texel5.xy are written 0.0 (the no-scalar identity — written unconditionally so a reused pool texture never leaks a previous tenant's scalars). The line shader's USE_COLORMAP path requires both; presence rides the userData.hasScalars stamp the call sites write (fail-closed).

    endScalars?: Float32Array<ArrayBufferLike>
    startAlphas?: Float32Array<ArrayBufferLike>

    Per-endpoint opacity alphas (count each) from an RGBA color column (volumetric phase 4), packed into texel5.zw. Absent ⇒ both slots are written 1.0 (the per-element-opacity identity — written unconditionally, pool-reuse safe). Presence rides the userData.hasElementAlpha stamp the call sites write, which gates only the volumetric w(a) optical-depth map.

    endAlphas?: Float32Array<ArrayBufferLike>

    Precomputed cull metadata from the projection's fused scan (AABB over start+end positions + max finite width). When present, computeLineBounds skips its O(N) per-segment scan (mirrors the points adapter's metadata.bounds fast path); absent ⇒ scan fallback. Computed over the FULL projected set: if the written count is capacity-clamped below it, the box is a conservative superset — safe for frustum culling.