Skip to content

Vibe coding a plugin? 😎 Teach your agent Modlumi first. Works with Claude Code, Codex, Cursor and more.

SnapTarget

SnapTarget = object & { point: Point3dLike; } | { infinite?: boolean; line: readonly [Point3dLike, Point3dLike]; } | { plane: { normal: Vector3dLike; point: Point3dLike; }; }

A place the pointer snaps to, from PluginContext.addSnapProvider, in model coordinates.

  • A point snaps like a midpoint does: before edges and faces, after endpoints, midpoints and intersections.
  • A line through two points snaps like a guide line, along its length, or past its ends too with infinite: true.
  • A plane moves the inferred point onto it when that moves it on screen by at most the snap aperture: along the line the point is on, such as an axis or an edge, or straight to the plane from a face or the ground. A plane seen almost face-on doesn’t pull points off a line or face, since the move would only change their depth.

readonly optional label?: string