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

    Module types/line-join

    Line join style — the strategy the vertex stage uses at a degree-2 polyline joint (issue #790).

    Without join geometry, two segments meeting at a turn of angle θ leave an uncovered circular sector of that angle on the OUTSIDE of the bend and double-cover a lens on the inside: measurably, dark ticks along the convex edge of a thick curve and bright ticks along the concave one. On the test_line_joins.luxar.zarr acceptance fixture (bend_width = 0.4), rendered with &lineJoin=none, the worst local-median deficit is 203/255 on the curve_smooth band and 200/255 on zigzag_right_angle. No per-endpoint intensity scalar can close the outer wedge — nothing rasterises there to shade — so it needs geometry.

    style per-vertex cost wedge blending modes
    none zero left open n/a
    miter + 1 texel fetch, 1 project exact all six, by construction

    miter is the only style that fits the existing 4-vertices-per-segment quad exactly: the mitred trapezoid's edges stay on the segment's own ±R offset lines, so the perpendicular super-Gaussian cross-section is untouched. round and bevel both need extra geometry, and an overlap variant (extend the quads so they genuinely overlap, cross-fading the axial ramps) was considered and dropped: it additionally needs the fragment stage (a signed cap ramp and vT reparameterised over the extended span), it is exact only under the sum-like blending modes, and it would lengthen every free polyline end.

    Both styles read the same per-endpoint joint code (compute_joint_codes in wasm/rust/src/lines_clipping.rs); none simply ignores it.

    LineJoinStyle
    DEFAULT_LINE_JOIN
    LINE_JOIN_UNIFORM
    LINE_JOIN_STYLES
    parseLineJoinStyle
    setLineJoinOverride
    resolveLineJoin
    lineJoinStyleFromUniform