API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classDistanceJoint
@codexo/exojs-physics / physics / stable
Holds the anchor points on two bodies at a target length along their connecting axis. With `hertz === 0` it is rigid; with `hertz > 0` it behaves as a damped spring. Solved as a soft constraint in the sub-step loop, warm- started across frames.
9
props
0
methods
0
events
Import
import { DistanceJoint } from '@codexo/exojs-physics'Holds the anchor points on two bodies at a target length along their connecting axis. With `hertz === 0` it is rigid; with `hertz > 0` it behaves as a damped spring. Solved as a soft constraint in the sub-step loop, warm- started across frames.
Constructors1
new(options: DistanceJointOptionsConstruction options for a DistanceJoint.): DistanceJointProperties9
First constrained body.
Second constrained body.
collideConnected: booleanWhether bodyA and bodyB also collide with each other; see JointOptions.collideConnected.
dampingRatio: numberSoft-spring damping ratio.
enabled: booleanWhen false, the joint is skipped by the solver (but still tracked by the world).
hertz: numberSoft-spring frequency in Hz (0 = rigid).
length: numberTarget distance between the anchors.
maxLength: numberMaximum allowed distance (rope/limit mode).
minLength: numberMinimum allowed distance (rope/limit mode).
Source