Analysis updated 2026-05-18
Add realistic falling, colliding, and bouncing objects to a browser based 3D scene or game.
Simulate ragdolls, dominoes, or a drivable vehicle alongside a renderer like three.js.
Run physics simulations server side in Node.js without a browser.
| monteslu/box3d-wasm | highdelay/activate-watermark | paullagier/pala-one-firmware | |
|---|---|---|---|
| Stars | 15 | 15 | 15 |
| Language | C++ | C++ | C++ |
| Setup difficulty | easy | moderate | hard |
| Complexity | 3/5 | 2/5 | 4/5 |
| Audience | developer | general | developer |
Figures from each repo's GitHub metadata at analysis time.
Threaded build needs cross origin isolation headers, otherwise plain npm install works.
This project takes Box3D, a 3D physics engine originally written by Erin Catto (the same author behind the well known Box2D engine), and compiles it to WebAssembly so it can run inside a web browser or a Node.js app. The wrapper and build scripts are made by a different author, but the physics engine itself, including its design and behavior, comes entirely from Erin Catto's work, which is credited clearly in the project. You install it as a normal npm package called box3d-wasm. Once installed, you can create a physics world, add a ground and a falling box, and step the simulation forward in time to see objects move and collide, all using plain JavaScript objects for positions, rotations, and velocities. Because those objects use the same simple shape as libraries like three.js, results from the physics engine can be passed straight into a 3D rendering scene without extra conversion work. The package ships in two versions. One uses multiple worker threads for faster simulation when the browser or environment supports it, and the other runs single threaded everywhere else. The library automatically detects which one to use, though a developer can also choose a specific version directly. Using the threaded version in a browser requires setting two specific server headers so the page qualifies for the security mode that threads need. Beyond the basics, the engine supports different body types such as static, moving, and fully simulated objects, several shape types like boxes, spheres, capsules, and custom hull shapes, and a range of joints for connecting bodies together, such as hinges and motors. It also reports events for collisions and sensor triggers, and includes a way to apply an explosion force to nearby objects. Building the project from source requires the Emscripten toolchain, CMake, and a recent version of Node, and is only necessary for contributors who want to modify the underlying build rather than just use the published package. The wrapper code is MIT licensed, and the Box3D engine it wraps is also MIT licensed by its original author, with that license included in the package.
A WebAssembly build of the Box3D physics engine that runs the same code in browsers and Node.js.
Mainly C++. The stack also includes C++, WebAssembly, JavaScript.
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.