Documentation
    Preparing search index...

    Interface PickableTriangles

    §71's "geometry" strategy (A-11's analytic tier, 2026-08-29): the tessellated triangles a candidate's true shape is made of, in the node's local space, so a box hit can be confirmed — or rejected — by exact ray/triangle intersection. The box stays the broad phase; the triangles are what say a concave silhouette's notch, a circle's corner gap, or a mesh's empty margin was not hit.

    The record is structural for the module header's reason: @fourjs/input may not import @fourjs/geometry (plan §3.1), so the layout is BufferGeometry's own (positions/indices) without naming it, and the layer that sees geometry builds the record in one line:

    // in the application, which may import @fourjs/geometry:
    pickable.triangles = { positions: geometry.positions, indices: geometry.indices };

    Möller–Trumbore per triangle, in the candidate's local space with the deliberately unnormalized local ray — so, exactly as the box test's, the reported parameter is the world-space distance under any affine transform. Triangles are tested in index order and the smallest t >= 0 wins; winding does not matter (no backface culling — §71 states no winding rule, and a 2D shape must pick from either side of its plane). A triangle the ray runs exactly parallel to is skipped, as is any triangle whose arithmetic degenerates to NaN — the same fail-toward-miss discipline the internal box test (intersectBox) documents.

    A record is checked the first time it is consulted — lengths in threes, and every index inside positions ("invalid geometry indices", §85) — then remembered, because re-scanning an index array per pick would put an O(n) pass on a hot path (BufferGeometry validates on assignment for the same reason). In-place edits after that first consult are therefore not re-validated — markDirty's own rule — and an index left dangling by one reads as NaN arithmetic, which misses rather than crashes.

    interface PickableTriangles {
        indices?: Uint16Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>;
        positions: Float32Array;
    }
    Index
    indices?: Uint16Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>

    Triangle indices into positions, 3 per triangle — BufferGeometry.indices' layout. Absent means non-indexed: consecutive position triples are the triangles.

    positions: Float32Array

    Vertex positions, 3 floats per vertex, in the node's local space — BufferGeometry.positions' layout, and usually that very array.