A direct port of the Bullet physics engine to JavaScript using Emscripten for web-based physics simulations.
ammo.js is a direct port of the Bullet physics engine to JavaScript, compiled using Emscripten. It enables developers to integrate a full-featured, industry-standard physics engine into web applications, providing realistic simulations for games, interactive 3D experiences, and scientific visualizations without requiring a native plugin.
Web developers and game creators building browser-based 3D applications, simulations, or interactive experiences that require accurate physics, such as those using WebGL, Three.js, or other web graphics libraries.
Developers choose ammo.js because it offers the complete functionality of the mature Bullet physics engine in a web-compatible format, eliminating the need to implement physics from scratch or rely on less capable alternatives, while maintaining performance through WebAssembly and asm.js builds.
Direct port of the Bullet physics engine to JavaScript using Emscripten
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides the complete Bullet physics engine, including rigid body dynamics, collision detection, and soft body physics, as evidenced by the demos for cloth, ropes, and vehicles.
Supports both WebAssembly and asm.js builds, allowing optimization for modern browsers while maintaining compatibility, as highlighted in the separate demo links.
Autogenerated bindings expose the Bullet API via the Ammo.* namespace, enabling precise control identical to the C++ original, as shown in the example worker.js code.
Includes specialized systems for soft bodies, vehicles, and terrain, demonstrated in WebGL demos like the heightmap and vehicle examples.
The autogenerated bindings require verbose getter/setter functions for member variables and careful use of 'new', leading to error-prone code, as noted in the troubleshooting section.
Building from source demands Emscripten and cmake setup, with options like closure compilation, which adds overhead compared to drop-in libraries.
The full Bullet port results in substantial file sizes, and reducing them requires manual editing of ammo.idl or build flags, as admitted in the 'Reducing Build Size' section.
The README focuses on C++ porting and build instructions, with limited guidance for JavaScript users, relying heavily on example code that may not cover all use cases.