Skip to content

Javascript Donut Animation

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-

Published inTech

48 Comments

  1. baccarat online baccarat online

    As I am looking at your writing, baccarat online I regret being unable to do outdoor activities due to Corona 19, and I miss my old daily life. If you also miss the daily life of those days, would you please visit my site once? My site is a site where I post about photos and daily life when I was free.

  2. %%

    Feel free to visit my homepage: lake forest prescription drugs (Rosario)

Leave a Reply

Your email address will not be published. Required fields are marked *