views:

89

answers:

2

I am using JavaScript with images, SVG, canvas or pure HTML and CSS.

+4  A: 

Hi,

Take a look at Box2DJS. It's a Javascript port of the Box2d physics engine. Also, you should be careful when running physics simulations in browsers as performance will vary greatly depending on the browser's javascript execution.

keyboardP
A: 

Another Javascript port of Box2d has popped up: Box2dWeb

Based on the demos on the two sites, it doesn't look like it performs as well as Box2DJS, but if you don't mind the performance hit it seems to have a few advantages over Box2dJS:

  • It is packaged in a single file (Box2dJS has tons of files)
  • It doesn't appear to have any external dependencies (Box2dJS requires prototype)
  • It claims to be generated from a newer version of Box2dAS

It also looks like Box2DWeb doesn't work in IE, so that might be an issue.

Chris Jaynes