Re:Point and Spring Simulation
by bemmu on Sunday July 05, 2015 @04:21AM
(#9832919)
Calling requestAnimationFrame again after drawing the previous frame gives smoother results, no need for setInterval. You can know how much to update the physics by seeing how much Date.now() has changed since the previous frame.
[ Parent
| on HN ]
Thanks for the suggestion, I implemented it: https://github.com/ichub/physics/commit/5b875ea2d5e3dfa3f5a0...