jeromeetienne / ammo.js-demos

Demo application base class and 3D physics demos based on ammo.js. Support for several scenegraphs including Three.js and SceneJS.

Home Page:http://schteppe.github.com/ammo.js-demos/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

View all demos >>

This project aims to produce easy-to-use demo classes, that can be used to view physics simulations in ammo.js in any WebGL scenegraph.

There are two main classes in the framework. The first one is the DemoApplication that is supposed to be extended by the user. The DemoApplication base class contains functions for mouse picking and creating rigid bodies.

The second class is ShapeViewer and it is also supposed to be extended. ShapeViewer provides a simple interface toward a WebGL scenegraph and can through this interface be used by the DemoApplication.

Code structure

  • src/ Contains code for the demo framework, which makes ammo.js collaborate with a WebGL scenegraph.
  • demos/ The actual demos in their own subfolders.
  • other/ External libs such as ammo.js, jquery, scenegraph libs

Howto: Add a new Demo

  1. Create a folder with a unique name in demos/, eg. demos/MyDemo/.
  2. Copy .js and .html files from demos/TemplateDemo/ into your new folder.
  3. Start coding.

Updating gh-pages

The site (gh-pages) is updated by merging the master branch into the gh-pages branch now and then. Eg. git checkout gh-pages; git merge master

Todo

  • Make ShapeDrawer subclasses support more shapes
  • More demos :)

About

Demo application base class and 3D physics demos based on ammo.js. Support for several scenegraphs including Three.js and SceneJS.

http://schteppe.github.com/ammo.js-demos/

License:Other


Languages

Language:JavaScript 97.9%Language:HTML 2.0%Language:CSS 0.1%