Wunderlust

React Three Rapier

Rapier physics for react-three-fiber scenes: wrap the mesh and it falls and collides

Worth exploring

Wrap a mesh in a RigidBody inside a Physics and it falls and collides with no manual animation

Why it works
Colliders come from the mesh itself, so objects fall, hit and stack by physics rules and a scene feels physical with almost no animation code.
Watch out
Mind the versions: v2 needs R3F v9 and React 19, v1 is for React 18. Keep the fixed time step, since a variable one can make the simulation unstable.

What it is

A wrapper for the WASM-based Rapier physics engine in react-three-fiber. The Physics component runs the simulation and RigidBody generates colliders automatically (cuboid, ball, trimesh, hull); it also covers joints, sensors, collision groups, instances and a debug view.

What it’s for

For someone building a 3D scene in React who wants objects that fall, hit and stack without animating frame by frame.

Benefits

  • Colliders generated from the mesh
  • Fixed, spherical, revolute, prismatic, rope and spring joints
  • Collision events and sensors, with a fixed 60 fps step by default

Caveats

  • Version 2 needs @react-three/fiber v9 and React 19; v1 is for React 18.
  • With timeStep set to vary, the simulation can become unstable and non-deterministic.

More like this

React Three Fiber3D & WebGLReact Postprocessing3D & WebGLmultipleWindow3dScene3D & WebGLThree.js3D & WebGLSpline3D & WebGLShader Gradient3D & WebGL

Featured on Wunderlust

Is this yours? Show it’s in the stash.

Featured on Wunderlust

Open the stash

Open in Wunderlust