API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classMouseJoint

@codexo/exojs-physics / physics / stable

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.

7
props
0
methods
0
events
Import
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.

Constructors 1
new(options: MouseJointOptions): MouseJoint
Properties 7
bodyA: PhysicsBody
bodyB: PhysicsBody
dampingRatio: number
enabled: boolean
hertz: number
maxForce: number
target: VectorLike
Source