Hacker News new | past | comments | ask | show | jobs | submit login
Point and Spring Simulation (ichub.io)
12 points by ichub on July 5, 2015 | hide | past | favorite | 2 comments



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.


Thanks for the suggestion, I implemented it: https://github.com/ichub/physics/commit/5b875ea2d5e3dfa3f5a0...




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: