Skip to content

schteppe/ammo.js-demos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published