API reference

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

C

classPrismaticJoint

@codexo/exojs-physics / physics / stable

Constrains a body to **slide along a single axis** relative to another: the perpendicular translation and the relative rotation are locked (a 2×2 block); only translation along the axis is free, optionally driven by a motor and/or bounded by a translation limit. Solved in the sub-step loop, warm-started.

10
props
0
methods
0
events
Import
import { PrismaticJoint } from '@codexo/exojs-physics'

Constrains a body to **slide along a single axis** relative to another: the perpendicular translation and the relative rotation are locked (a 2×2 block); only translation along the axis is free, optionally driven by a motor and/or bounded by a translation limit. Solved in the sub-step loop, warm-started.

Constructors1
Properties10
collideConnected: boolean
Whether bodyA and bodyB also collide with each other; see JointOptions.collideConnected.
enabled: boolean
When false, the joint is skipped by the solver (but still tracked by the world).
enableLimit: boolean
When true, the axis translation is constrained to [lowerTranslation, upperTranslation].
enableMotor: boolean
When true, the motor drives the axis translation toward motorSpeed.
lowerTranslation: number
Lower translation limit along the axis.
maxMotorForce: number
Maximum motor force.
motorSpeed: number
Target translation speed along the axis (px/s).
upperTranslation: number
Upper translation limit along the axis.
Source