O'Reilly logo

WebGL Game Development by Sumeet Arora

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Comparing JavaScript 3D physics engines

Let's start by looking at the most popular JavaScript physics engines. Most of them are still under development. The three most popular JavaScript physics libraries are Box2dweb, Ammo.js, and JigLibJS. We will give you a quick introduction to each one and then use JigLibJS in our code.

Ammo.js

Ammo.js is directly ported from the Bullet physics engine (a C++ physics library) using Emscripten (https://github.com/kripken/emscripten). There is no human rewriting involved in the translation of the source code. The full form of Ammo is Avoided making my own. Ammo.js is a fully featured, rich physics library with a wide range of options for physics shapes. It supports all features such as collision detection, constraints, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required