Cannon.js
This article, Cannon.js, has recently been created via the Articles for creation process. Please check to see if the reviewer has accidentally left this template after accepting the draft and take appropriate action as necessary.
Reviewer tools: Inform author |
Comment: In this case, reviews would have helped because they establish substance; without it, the article is not as convincing; as a possible solution, you could add all available major independent news. SwisterTwister talk 15:45, 20 February 2017 (UTC)
Comment: Would benefit from any available reviews. SwisterTwister talk 21:45, 15 February 2017 (UTC)
Developer(s) | Stephan Hedman |
---|---|
Repository | |
Written in | JavaScript |
Operating system | OS independent |
Platform | Javascript |
Type | 3D Physics Engine |
License | MIT License |
Website | www |
As of | February 2017 |
Cannon.js is an open source JavaScript physics engine.
Cannon.js was written entirely in Javascript. This is in contrast..[1][2] 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[3] (minified and zipped), compared to ammo.js 452KB[4] (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. This collection of shapes matches the collection used by rendering engines such as Three.js and Babylon, but is not complete. For example, it is not sufficient for X3DOM[5]
The physics engine implements rigid-body dynamics, collision detection (Gauss-Seidel), and constraints. It can perform cloth simulation[6]
Cannon.js can be used with Three.js and Babylon.js WebGL renderers to generate physics-based 3D scenes. It can also be used to provide networked-physics synchronization for multiplayer online games using Incheon[7]