Skip to content
MotionLab

Rigid-Body Physics

Click to rain rigid bodies into a bowl. Real collisions via Rapier (WASM).

sketchR3FRapier

How it works

@react-three/rapier runs the Rapier WASM world; bodies are capped at 150 and the oldest are recycled.

Performance

Renders through the single shared <Canvas> via drei <View> — no extra WebGL context, and the render loop only runs while a view is mounted. Physics steps at a fixed timestep independent of frame rate.

Accessibility & reduced motion

A “Drop” button mirrors the click interaction; reduced mode pauses the simulation.

Playgroundcustom
Export
{
  "restitution": 0.5,
  "gravity": -9.81,
  "batch": 8
}