Ammo.js Physics in Three.js — Bullet Physics for Web
Ammo.js is the WASM port of Bullet Physics — full-featured rigid body simulation for Three.js scenes that need it.
Ammo.js is a WebAssembly port of Bullet Physics, the engine used in Blender and many AAA games. It brings full rigid-body simulation, soft bodies (cloth, rope), and constraints to Three.js. Compared to alternatives: cannon-es is JS-native and lighter (~50KB vs Ammo's ~700KB), simpler API, sufficient for most web projects. Ammo.js is heavier but more accurate — vehicle simulations, complex constraint systems, soft body cloth. I default to cannon-es for medium complexity, switch to rapier (Rust-WASM, fastest) for production-grade simulations. Ammo.js sits in between — use it when migrating from Blender/Bullet asset pipelines or when accuracy matters more than bundle size.
What this delivers
Concrete output: a working ammo physics three js integration on a real production site, not a demo. The integration includes device-tier detection so weak phones get a lighter version automatically. Source files are handed over in their original formats — Blender, GLSL, glTF — so any future developer can continue where I stopped.
How I work with it
On a typical project, ammo physics three js ships as a self-contained module: one entry-point JS file, one CSS file, asset bundle below 1.5MB total. I keep the integration sandboxed so the rest of the site stays SEO-friendly classical HTML. Frame budget targets 60 FPS on a mid-range Android, with a measurable fallback below.
Performance budget
Lighthouse mobile target: 85+ across all categories. I measure on real devices, not just emulator. Asset compression: glTF + Draco for meshes, KTX2 for textures, Brotli for shaders. Lazy-load any ammo physics three js scene that isn't above the fold so the first paint stays under 1.5s.
When this is overkill
If the goal is a simple e-commerce listing or content blog, a full ammo physics three js setup is overkill — a CSS-driven hero plus static images converts just as well at 1/10 the cost. ammo physics three js earns its keep when the brand needs a memorable visual moment or when 3D actually clarifies the product (configurators, tours, demos).
Frequently asked questions
Why pick this technology over alternatives?
What if a newer tool comes out next year?
How long does this take?
What does it cost?
What if my visitors are on weak phones?
Ready to ship a 3D experience?
Tell me what you need — fixed price, fixed deadline, no surprises.