Snap landing site. Present on a PickResult only when the renderer landed a vertex or edge within PickParams.snapRadius pixels of the cursor.

The snap is independent of whether a surface ray hit anything: a snap may exist with no underlying surface hit (cursor in empty space), or vice versa.

interface PickSnap {
    canvasPos: Vec2;
    type: "vertex" | "edge";
    worldPos: Vec3;
}

Properties

canvasPos: Vec2

Canvas-pixel position of the snapped vertex / edge midpoint.

type: "vertex" | "edge"

What the renderer snapped to. Vertex preferred on ties.

worldPos: Vec3

World-space position of the snap. Always populated when this object exists.