r3f-learning-01

LESSON 10

Physics

@react-three/rapier wraps a Rust-compiled physics engine in the same declarative JSX shape as R3F. <Physics> is the world, <RigidBody> wraps anything that should move, <CuboidCollider> is a static shape. Click empty floor to drop a new body; click a body to launch it.

Refs on <RigidBody> expose imperative methods like applyImpulse and setTranslation without round-tripping through React state. Rapier ships its WASM binary — Next will load it on first physics route visit.