API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
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
new(options: PrismaticJointOptionsConstruction options for a PrismaticJoint.): PrismaticJointProperties10
First constrained body.
Second constrained body.
collideConnected: booleanWhether bodyA and bodyB also collide with each other; see JointOptions.collideConnected.
enabled: booleanWhen false, the joint is skipped by the solver (but still tracked by the world).
enableLimit: booleanWhen true, the axis translation is constrained to [lowerTranslation, upperTranslation].
enableMotor: booleanWhen true, the motor drives the axis translation toward motorSpeed.
lowerTranslation: numberLower translation limit along the axis.
maxMotorForce: numberMaximum motor force.
motorSpeed: numberTarget translation speed along the axis (px/s).
upperTranslation: numberUpper translation limit along the axis.
Source