API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classMouseJoint
Softly pulls a single body's grab point toward a movable **target** point (typically the mouse cursor). The grab point is fixed on the body at creation; update target each frame to drag. A soft constraint bounded by maxForce — solved in the sub-step loop, warm-started. Internally the "other" body is a private static ground sentinel, so this is a single-body constraint that touches only the dragged body.
import { MouseJoint } from '@codexo/exojs-physics' Softly pulls a single body's grab point toward a movable **target** point (typically the mouse cursor). The grab point is fixed on the body at creation; update target each frame to drag. A soft constraint bounded by maxForce — solved in the sub-step loop, warm-started. Internally the "other" body is a private static ground sentinel, so this is a single-body constraint that touches only the dragged body.
new(options: MouseJointOptions): MouseJoint bodyA: PhysicsBody bodyB: PhysicsBody dampingRatio: number enabled: boolean hertz: number maxForce: number target: VectorLike