A few years ago everybody with a nice phone or a tablet went crazy over Angry Birds, a 2D rigid body physics simulation based on the open source Box2D (http://box2d.org/about/) engine. While the fun cartoonish artwork of birds and pigs were a factor in the success of that game series, what players really loved was the realistic slinging, throwing, bashing, and crashing provided by the physics engine in that game.

Now the same technology is available in JavaScript for in-browser interactive experiences. Try out the demos on these project sites for two different fairly new physics libraries. Both are pretty new, having been published on GitHub both since the start of this year.

The p2.js library. Some nice basic demos, showing solid performance in situations with many interactive objects. These screen captures don’t do the demos full justice, click the links and try dragging some things around:

The PhysicsJS library. A little scarce on documentation and looking a little harder to get into as a developer, but the demos are really amazing in their realism and fluid movement:

Note that these are just libraries. This bare-bones code doesn’t look great or provide a complete or polished experience. But, it gives web developers what they need to apply creative work to a fun interaction mechanic based on what you see in these examples. Food for thought for future web projects!