Skip to content

Month: November 2021

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-

Comments closed

Javascript Bezier Curve Animation Library

I wrote a Javascript bezier curve animation library. I can’t seem to find any javascript bezier animation library that can handle multiple degree, so I made one myself. You can download it from the github here: https://github.com/tealtadpole/tt-javascript-bezier-animation Live example You  can see the live example here: https://web.tealtadpole.me/tt-javascript-bezier-animation/ You can download the live example html file (or clone it from the github repository), then dissect the content inside. The usage is pretty simple, and I think it should cover most custom animation cases. I use requestAnimationFrame( ) method for a better performance (it will be paused when the tab is inactive…

Comments closed