Cannon.js
Developer(s) | Stefan Hedman |
---|---|
Repository | |
Written in | JavaScript |
Operating system | OS independent |
Type | 3D physics engine |
License | MIT License |
Website | www |
Cannon.js is an open source JavaScript physics engine created by Stefan "schteppe" Hedman.[1] Unlike physics engine libraries ported from C++ to Javascript, cannon.js is written in Javascript from the start and can take advantage of its features.[2] In a 2013 comparison with Ammo.js, cannon.js was found to be "more compact, more comprehensible, more powerful with regard to its performance and also easier to understand", but did not have as many features.[3]
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.[3]
The physics engine implements rigid-body dynamics, collision detection (Gauss-Seidel), and constraints. It can perform cloth simulation[4]
Cannon.js can be used with Three.js and Babylon.js[5][6] 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]
References
- ^ "Stefan Hedman". GitHub. Retrieved 27 April 2017.
- ^ Prall, Chandler (10 April 2012). "JavaScript Physics Engines Comparison". Build New Games. Retrieved 27 April 2017.
- ^ a b Huber, Linda (2013). "Initial Steps for the Coupling of JavaScript Physics Engines with X3DOM". Workshop on Virtual Reality Interaction and Physical Simulation (VRIPHYS 2013). The Eurographics Association. pp. 81–90. doi:10.2312/PE.vriphys.vriphys13.081-090. ISBN 978-3-905674-57-6.
{{cite book}}
: Unknown parameter|editors=
ignored (|editor=
suggested) (help) - ^ "Cloth physics simulation".
- ^ "Create wonderful interactive games for the web: Using webgl and a physics engine (babylon.js & cannon.js)". Retrieved 21 February 2017.
- ^ "MSDN Game Development with Babylon.js". Retrieved 21 February 2017.
- ^ "Incheon source repository".