THREE.JS / FOUNDATIONS 199

A familiar contract. A different world.

Ammo.js is the Bullet-derived sibling to the Rapier and Jolt studies. This route keeps the same scene-to-world contract visible while tracing Ammo's per-instance rigid bodies and fixed-rate synchronization loop.

Initializing Preparing renderer

Preparing WebGLRenderer, instanced buffers, and AmmoPhysics...

physics
-
boxes
-
spheres
-
bodies
-
resets
-
render frames
-
fps
-
Indexed body controlsAmmo transform sync

Click a box or sphere to select its instance index. Ammo's reposition method clears linear and angular velocity before changing the body transform.

Ammo contractBullet/WASM bridge
await AmmoPhysics()load Ammo.js from a CDN
mesh.userData.physicsdeclare mass/restitution
physics.addScene(scene)register floor + instances
setMeshPosition(mesh, p, i)zero velocity + reposition
world.stepSimulation(delta, 10)advance the Bullet world

The current addon supports BoxGeometry, SphereGeometry, IcosahedronGeometry, ordinary meshes, and InstancedMesh. It exposes no official impulse, collider-helper, removal, or dispose method; the lifecycle limitation is intentionally visible.

Selected instancenone
source mesh-
instance index-
body shape-
reposition API-

Ammo is loading. The addon requires an active Internet connection and owns an internal fixed-rate timer.

Based on the official Ammo instancing example. Compare this route with the Rapier and Jolt labs: the public addon contract looks similar, but the underlying body ownership and lifecycle behavior differ.

THREE.JS FOUNDATIONS LAB