Couple of days ago I watched a Youtube video about donut animation by Lex Fridman. So I decided to copy-pasted his code and made a Javascript’s requestAnimationFrame( ) version of it. Since I didn’t make any delay for the animation, I was surprised how the browser can keep the frame rate around 60fps in my laptop. 🙂 Original donut article made by Andy Sloane at https://www.a1k0n.net/2011/07/20/donut-math.html. Andy made a great explanation about the algorithm, and even made an optimized version of it (without math sin/cos library) here: https://www.a1k0n.net/2021/01/13/optimizing-donut.html. Live version: https://web.tealtadpole.me/tt-javascript-donut/ Github code: https://github.com/tealtadpole/tt-javascript-donut – tt-
Comments closed#008080 :)