Cannon-es with Three.js — JS-Native Physics
Cannon-es is the maintained ES module fork of cannon.js — pure JS rigid-body physics, sufficient for most web 3D projects.
Cannon-es (pmndrs/cannon-es) is the actively maintained fork of the original cannon.js by schteppe. Pure JavaScript (no WASM), ~50KB bundle, decent performance for hundreds of rigid bodies on the web. API is friendly: World class for the simulation, Body class for objects, standard shapes (Box, Sphere, ConvexPolyhedron, Plane). Constraints are well-supported (HingeConstraint, PointToPointConstraint, DistanceConstraint). My default physics engine for Three.js — fast enough for portfolio sites, configurators, and most marketing 3D, simpler than Ammo or Rapier. Switch to rapier (faster) only when simulation complexity exceeds 200+ active bodies.
What you get hands-off
After delivery: source repository on GitHub (private), commented code, a 5-min Loom walkthrough explaining the scene logic, and the asset pipeline documented. First year of hosting and minor revisions is included. After that we agree on a maintenance plan if needed.
What this delivers
Concrete output: a working cannon es 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, cannon es 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 cannon es three js scene that isn't above the fold so the first paint stays under 1.5s.
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.