Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Game Engine Development
  3. Ammo.js

Ammo.js

NOASSERTIONC++

A direct port of the Bullet physics engine to JavaScript using Emscripten for web-based physics simulations.

GitHubGitHub
4.5k stars580 forks0 contributors

What is Ammo.js?

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.

Target Audience

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.

Value Proposition

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.

Overview

Direct port of the Bullet physics engine to JavaScript using Emscripten

Use Cases

Best For

  • Adding rigid body physics to WebGL-based games
  • Creating interactive 3D simulations with collision detection
  • Implementing soft body physics like cloth or rope in web demos
  • Building vehicle physics systems for browser-based driving games
  • Developing educational physics visualizations for the web
  • Porting existing C++ Bullet projects to run in a browser

Not Ideal For

  • Projects needing only lightweight 2D physics without 3D features
  • Teams unfamiliar with C++ or Bullet's API who prefer JavaScript-native libraries
  • Quick prototypes where setup time and bundle size are critical constraints
  • Mobile-first web apps where large WebAssembly downloads could impact performance

Pros & Cons

Pros

Industry-Standard Feature Set

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.

High Performance Options

Supports both WebAssembly and asm.js builds, allowing optimization for modern browsers while maintaining compatibility, as highlighted in the separate demo links.

Direct Bullet API Access

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.

Advanced Simulation Capabilities

Includes specialized systems for soft bodies, vehicles, and terrain, demonstrated in WebGL demos like the heightmap and vehicle examples.

Cons

Cumbersome JavaScript API

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.

Complex Build Process

Building from source demands Emscripten and cmake setup, with options like closure compilation, which adds overhead compared to drop-in libraries.

Large Bundle Size

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.

Sparse JavaScript Documentation

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.

Frequently Asked Questions

Quick Stats

Stars4,512
Forks580
Contributors0
Open Issues161
Last commit2 years ago
CreatedSince 2011

Tags

#bullet-physics#webassembly#emscripten#collision-detection#3d-simulation#game-development#soft-body-physics#webgl#javascript#physics-engine

Built With

E
Emscripten
W
WebAssembly
C
CMake
D
Docker
C
C++

Included in

Open Source Games2.7kGame Engine Development1.3k
Auto-fetched 22 hours ago

Related Projects

VueVue

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core

Stars209,881
Forks33,861
Last commit1 year ago
BootstrapBootstrap

The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.

Stars174,308
Forks78,849
Last commit22 hours ago
electronelectron

:electron: Build cross-platform desktop apps with JavaScript, HTML, and CSS

Stars121,570
Forks17,247
Last commit1 day ago
d3d3

Bring data to life with SVG, Canvas and HTML. :bar_chart::chart_with_upwards_trend::tada:

Stars113,031
Forks22,720
Last commit11 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub