Jump to content

Cannon.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by StarryGrandma (talk | contribs) at 22:58, 27 April 2017 (Commenting on submission (AFCH 0.9)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
  • Comment: I will look at this and see if I can accept it. There are reliable sources cited that are independent of Stefan Hedman, the developer. That would seem to be enough. StarryGrandma (talk) 22:58, 27 April 2017 (UTC)
  • Comment: I did not find independent news. However I did find an in-depth technical walkthrough on MSDN (Microsoft Developer Network) that builds a game (bowling game) using babylon.js and and cannon.js from January of last year, see reference..Cite error: There are <ref> tags on this page without content in them (see the help page). and also, a somewhat older but still correct review Cite error: There are <ref> tags on this page without content in them (see the help page).. This library does not get mentioned in news, mostly because its code is stable and it "just works". Fourvelocity
  • Comment: I would hardly call it a "stunning dearth of WP:RS reviews" when there is an MSDN article on the Microsoft home page (invited blog on a curated journal), an MSDN blog on the Microsoft home page, a demo on the Mozilla MDN page, an arbitrated journal and third-party demos which include a cloth simulation and game. This is a really useful library and it doesn't get discussed because it "just works" - but it in fact quite popular judging by Google. When searching for "Javascript physics engine" on Google, cannon.js is the third result, and the only one written natively in javascript. Please reconsider, I am an unbiased party who is trying to help out visitors to Wikipedia who want to choose between the available (and stable) javascript physics engines. Fourvelocity —Preceding undated comment added 10:24, 20 March 2017 (UTC)
  • 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)

Cannon.js
Developer(s)Stefan Hedman
Repository
Written inJavaScript
Operating systemOS independent
PlatformJavascript
Type3D Physics 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[1][2][3] 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[4] (minified and zipped), compared to ammo.js 452KB[5] (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[6].

The physics engine implements rigid-body dynamics, collision detection (Gauss-Seidel), and constraints. It can perform cloth simulation[7]

Cannon.js can be used with Three.js and Babylon.js[8][9] WebGL renderers to generate physics-based 3D scenes. It can also be used to provide networked-physics synchronization for multiplayer online games using Incheon[10]

References

  1. ^ "Physics Engines Comparison".
  2. ^ "javascript physics engine and windows 8 games".
  3. ^ "A Comparison of JavaScript Physics Engines". Retrieved 22 February 2017.
  4. ^ "cannon.js download".
  5. ^ "ammo.js download".
  6. ^ "Initial steps for the coupling of Javascript Physics Engines with X3DOM" (PDF).
  7. ^ "Cloth physics simulation".
  8. ^ "Create wonderful interactive games for the web: Using webgl and a physics engine (babylon.js & cannon.js)". Retrieved 21 February 2017.
  9. ^ "MSDN Game Development with Babylon.js". Retrieved 21 February 2017.
  10. ^ "Incheon source repository".