API

Interface PointerDragOptions

Configuration for converting pointer movement into world-space drag deltas.

interface PointerDragOptions {
    dragAxis?: Vec3;
    dragPlaneNormal?: Vec3;
    getPlanePoint?: () => Vec3 | null;
    moveAttached?: boolean;
    updateDragPlane?: boolean;
}
Index
dragAxis?: Vec3

Drag along a single world-space axis (unit vector). Mutually exclusive with dragPlaneNormal.

dragPlaneNormal?: Vec3

Drag inside a plane defined by this world-space normal. Mutually exclusive with dragAxis.

getPlanePoint?: () => Vec3 | null

Optional override for the drag-plane anchor point (plane mode only). When it returns a point, the camera-facing drag plane passes through that point instead of the picked surface point, so the screen→world scale is taken at that depth. The BoundingBoxGizmo body drag anchors at the bounding-box CENTRE (matching BJS, whose body _dragMesh sits at the box centroid) so the translation scale doesn't depend on where the press landed on the (inset, camera-facing) body surface.

moveAttached?: boolean

When false, the dispatcher fires events but doesn't move the picked mesh. Gizmos always set this to false and apply transforms to their attached node themselves.

updateDragPlane?: boolean

Whether to refresh the active drag plane while dragging. Defaults to true.