Usage: Click and hold inside the grey square to create a ball. The longer you hold down the mouse, the bigger the ball. Click, drag around, and release a ball to ‘throw’ it. You can change gravity and the drag coefficients by changing the numbers in the boxes below. Gravity can be any number, negative, positive or zero. Drag coefficient is only going to make sense as a number between 0 and 1. Greater than 1 means that energy is added to the system and things get a little crazy!
Note: to see this you will need to be using Firefox, Chrome or Opera.
drag and release to move and throw a ball.
Disclaimer: Given that this was such a casual collaboration, please excuse the messiness of the code. It was just the fastest way to get this kind of thing happening. If you want a more coherent mechanism for control, Box2DJS is the way to go.
(this is just so that a link to this post has a pretty picture to show!)