orbital-engine
    Preparing search index...

    Interface ProximityCandidate

    Bubble-cursor / proximity target selection.

    True-to-real-scale rendering (see scale.ts's trueRadius) makes most bodies here tiny and, in a cluster (the Galilean moons, a group of Lagrange-point stations), packed close together on screen — requiring a pointer to land exactly on a target's own rendered footprint would make precise selection nearly impossible, especially on a trackpad/touch target. This instead picks whichever candidate's PROJECTED SCREEN position is nearest the pointer, within a generous snap radius, rather than requiring a literal geometric hit — the same underlying idea as the published "bubble cursor" target-acquisition technique (Grossman & Balakrishnan, 2005: cursor "bubbles" resize so exactly one target is ever selectable), adapted here to a set of point-like targets (every body reduces to a single screen point once you can't rely on its own visible size) rather than resizable bubbles over 2D shapes.

    No existing npm package combines this with a react-three-fiber/WebGL scene (checked: bubble-cursor implementations that do exist target 2D DOM/accessibility toolkits, not a projected-3D-point use case) — this is a small, self-contained, independently-testable module rather than an external dependency.

    interface ProximityCandidate {
        id: string;
        x: number;
        y: number;
        radiusPx?: number;
        depth?: number;
    }
    Index
    id: string
    x: number

    Screen-space pixels, NOT normalized device coordinates — keeps the snap radius meaningful in actual on-screen distance regardless of canvas resolution.

    y: number
    radiusPx?: number

    On-screen radius (px) of the body's rendered disc — see findPointerTarget. Absent or 0 for a point-like target.

    depth?: number

    Distance from the camera, in any consistent unit — used only to order overlapping discs (see findPointerTarget).