Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working on a web-based 3D FPS game using WebGL, HTML5 and JavaScript. It is supposed to target PCs and net-books with WebGL-enabled browsers installed.

I'm wondering if there's an existing open source 3D physics engine written in JavaScript?

share|improve this question

closed as not constructive by Sean Middleditch, bummzack, Byte56, sam hocevar, Josh Petrie Mar 6 '13 at 16:12

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 10 down vote accepted

There are a couple both jiglib and bullet have been ported but it's still very early days. See and

share|improve this answer
really nice answer :) – Deyaa Nov 9 '10 at 8:53

I don't know about any 3D physics-engine implemented in JavaScript. But maybe you could have a look at the Quake2 > HTML5 port and look how they did it:

From what I understood, they used the Google Web Toolkit (GWT) to compile Java-Sources to JavaScript. I think this approach may have some benefits for your project as well, since it's much more likely that you'll find a good 3D physics-engine for Java than for JavaScript.

share|improve this answer

I would take a look at Three.js

I've used it in a couple of projects and works quite well. It also has nice documentation.


share|improve this answer
Three.js is a graphics library, nothing to do with 3d physics by itself. – Tapio Dec 27 '12 at 12:10

While personally I use ammo.js (see schteppe's answer) through Physijs wrapper, I'd also like to mention cannon.js, which is specifically created for JavaScript, unlike ammo.js, which is automatically compiled from C++ to JS. The downside is much less features in cannon.js.

JigLibJS which was mentioned by Paul Brunt appears to be unmaintained.

share|improve this answer

cannon.js. It's much faster than ammo.js because it was written in native JS instead of being ported from C++. Unfortunately, its documentation is pretty much nonexistent.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.