THREE.JS / FOUNDATIONS 202

Constraints make motion legible.

This route turns Rapier's joint API into a controlled chain experiment: typed anchors, constrained degrees of freedom, motor and limit settings, contact policy, and explicit joint removal and re-attachment.

Initializing Preparing renderer

Preparing the chain, joint descriptors, and RapierPhysics...

physics
-
bodies
-
joints
-
type
-
motor
-
contacts
-
impulses
-
fps
-
Joint controlslink 1

Select a link to inspect its body, parent joint, and anchor path.

Rapier joint contractofficial API boundary
await RapierPhysics()create gravity world
physics.addMesh(...)register rigid bodies
RAPIER.JointData.*(...)describe joint anchors
world.createImpulseJoint(...)connect two bodies
joint.configureMotorVelocity(...)drive a DOF
joint.setLimits(...)bound a DOF
world.removeImpulseJoint(...)detach constraint
new RapierHelper(world)inspect collider topology

Spherical, revolute, prismatic, rope, and spring descriptors all reuse the same six-body chain. The visible anchor markers are derived from the local anchor vectors passed into JointData.

Selected linkjoint 1
shape-
position-
parent joint-
joint state-

Rapier is loading. The helper becomes available only with a live Rapier world.

Based on the official Rapier joints example and joint API. The CPU fallback preserves the chain controls and labels, but it does not claim full constraint-solver parity.

THREE.JS FOUNDATIONS LAB