API reference

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

C

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
Properties9
collideConnected: boolean
Whether bodyA and bodyB also collide with each other; see JointOptions.collideConnected.
dampingRatio: number
Soft-spring damping ratio.
enabled: boolean
When false, the joint is skipped by the solver (but still tracked by the world).
hertz: number
Soft-spring frequency in Hz (0 = rigid).
length: number
Target distance between the anchors.
maxLength: number
Maximum allowed distance (rope/limit mode).
minLength: number
Minimum allowed distance (rope/limit mode).
Source