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.
Preparing WebGLRenderer, instanced buffers, and AmmoPhysics...
- physics
- -
- boxes
- -
- spheres
- -
- bodies
- -
- resets
- -
- render frames
- -
- fps
- -
Click a box or sphere to select its instance index. Ammo's reposition method clears linear and angular velocity before changing the body transform.
await AmmoPhysics()load Ammo.js from a CDNmesh.userData.physicsdeclare mass/restitutionphysics.addScene(scene)register floor + instancessetMeshPosition(mesh, p, i)zero velocity + repositionworld.stepSimulation(delta, 10)advance the Bullet worldThe 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.
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.