josephg / Chipmunk-js

Port of slembcke/Chipmunk-Physics to Javascript
http://dl.dropbox.com/u/2494815/demo/Joints.html
537 stars 59 forks source link

Additional demo, and some anti-pattern cleanups in demo #23

Closed onedayitwillmake closed 11 years ago

onedayitwillmake commented 11 years ago

I added a new demo, DetermisticTest which test that the simulation is locally deterministic (on the same machine, objects falling from same point, at same speed, colliding with a bunch of other objects bounce in the exact same trajectory each time)

I also modified the Demo base class to clean up some of the mouse functions, such that they are now part of the demo prototype, allowing subclassing demo's to overwrite them, while preventing issues of having more than one demo instance on the screen at a time.

Finally I added a queryString to the index.html page load function, which will look for a querystring parameter (demoIndex=x), and load that demo or use a random one as before. When a demo is selected the query string is set, so that refreshing it reloads the same demo (useful when testing)

onedayitwillmake commented 11 years ago

Will make some tweaks per above and resubmit