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

    One leg of a joint, in a shared 2D px frame with the joint at the origin.

    The radii are RAW (pre-clamp) pixel radii — the shader's rawA/rawB. This reference model operates at DPR/render scale 1, so its pixel values are CSS pixels. The model clamps them to CAPSULE_MIN_RADIUS_PX for the profile geometry and dims the leg by capsuleLegWidthScale, exactly as the vertex stage does, so a sub-floor leg is a representable (floored, dimmed) leg rather than an illegal one. It mirrors the FLOOR of the shaders' clamp(raw, MIN, uMaxLinePixelWidth) only, never the ceiling: that is a uniform, so there is no value to fold in here — pass radii already inside whatever cap the scene uses, or the model reads wider than the shader draws.

    INVARIANT: the two legs of a pair must share rJoint. They meet at one vertex whose width is one number, and the deficit rebuild reads MY shared-vertex radius as the partner's starting radius (the packed vPack.z lane, unpacked as pkR, #1494) — a pair that disagrees there measures nonsense (−0.83 on a row that is otherwise exact).

    interface CapsuleJointLeg {
        dir: readonly [number, number];
        rJoint: number;
        rFar: number;
        length: number;
    }
    Index
    dir: readonly [number, number]

    Unit direction from the joint vertex toward the leg's far end.

    rJoint: number

    RAW radius at the shared joint vertex, px (both legs must agree).

    rFar: number

    RAW radius at the far end, px.

    length: number

    Leg length (projected), px.