Jump to content

Cannon.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Fourvelocity (talk | contribs) at 07:12, 15 February 2017 (Created page with '{{subst:AFC submission/draftnew}}<!-- Important, do not remove this line before article has been created. --> {{Infobox software | title = Cannon...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Cannon.js
Developer(s)Stephan Hedman
Repository
Written inJavaScript
Operating systemOS independent
PlatformJavascript
Type3D Game Engine
LicenseMIT License
Websitewww.cannonjs.org
As ofFebruary 2017

Cannon.js is an open source JavaScript physics engine.

Cannon.js was written entirely in Javascript. This is in contrast with typical physics engines which can run in browsers (for example, Bullet and Box2D), which were originally written in C or C++, and compiled from LLVM instructions to JavaScript via Emscripten.

The primary advantage that cannon.js gains from this approach is that the size of the resulting package is much smaller. As of February 2017, Cannon.js is sized at 36.4KB[1] (minified and zipped), compared to ammo.js 452KB[2] (minified and zipped). This approach may also imply performance advantages, though performance comparisons do not exist.

Features

Cannon.js supports the following shapes: Sphere, Plane, Box, Cylinder, Convex Polyhedron, Particle, and Heightfield.

The physics engine implements rigid-body dynamics, collision detection (Gauss-Seidel), constraints.

References

  1. ^ "cannon.js download".
  2. ^ "ammo.js download".