Physics has a second world.
Three.js draws the room and bodies while Rapier advances rigid-body state. Spawn ordinary meshes, inspect their colliders, then apply impulses without hiding the synchronization boundary.
Preparing WebGLRenderer, room colliders, and RapierPhysics...
- physics
- -
- bodies
- -
- grounded
- -
- impulses
- -
- colliders
- -
- draws
- -
- fps
- -
Click a body in the scene to select it. Impulses are applied to the selected mesh through Rapier.
await RapierPhysics()create gravity worldphysics.addScene(scene)register mass metadataphysics.addMesh(mesh, ...)create a rigid bodyphysics.applyImpulse(...)change body velocitynew RapierHelper(world)visualize collidersThe official addon runs a fixed-time Rapier world and copies body transforms back to Three.js meshes. The local fallback is intentionally labeled and only preserves gravity and room bounds when the CDN module cannot load.
Rapier is loading. Collider lines will appear only after the official helper has a live world.
Based on the official Rapier physics example. Orbit the room, click a body, and use the impulse controls to watch Three.js visuals respond to physics-owned transforms.