Adding gravity to sprites in canvas

See the third link in