Gravity simulator in three.js