Personal Projects and Mucking Around

© Luke Wallin 2005-2017

JavaScript 2D Physics Sandbox

2D sandbox

The physics sandbox started off life as a debugging tool for my 2D engine, but I got rather carried away with adding features. Version 4 now supports:

  • Creating and deleting regular and custom polygons and circles.
  • Giving +ve and -ve charge.
  • Springs (non-collidable) and string (flexible and collidable)
  • Saving, loading and sharing worlds.
  • Large world with movable and zoomable view

Overall, it's quite fun to play around building towers using circles and cross-braced springs and pinging things about with too much charge.

The sandbox uses HTML 5's canvas (and Google's excanvas for IE), so needs a fairly recent browser and far too much CPU power for what it is. The first sandbox requires less CPU power and runs in older browsers, but looks much worse.

Currently version four has pretty much the same feature-set as version 2 did. However, it now uses the latest version of my physics engine and so should gain features quickly.