Zero gravity in JavaScript