From the tutorial:
Building a 2D Browser Game with PhysicsJS
on flippinawesome. (
See the final version here
).