Rapier
- bodies
- -
- selected
- -
- active API
- -
- state
- loading
Rapier, Jolt, and Ammo all bridge a Three.js scene to a separate rigid-body world, but their wrappers do not promise the same operations. This lab renders the same indexed InstancedMesh rig three times so the shared boundary and the API differences stay visible together.
Preparing three independent scenes and physics worlds...
Click a box or sphere in any panel to select its indexed body. Shared actions target the selected kind and index in every backend, making transform and force differences comparable.
async initRapierPhysics()JoltPhysics()AmmoPhysics()addSceneyesyesyessetMeshPositionindexedindexedindexedapplyImpulseyes——setMeshVelocityyesno-op source—removeMeshyes——heightfieldyes——official dispose———Based on the official physics instancing examples and addon docs. The wrappers own private fixed-rate timers; this route disposes the Three.js renderers and makes that addon lifecycle boundary explicit.