How to Make an Animation - setInterval vs. requestAnimationFrame

Subscribers:
58,000
Published on ● Video Link: https://www.youtube.com/watch?v=KxrfFKapMFo



Category:
Tutorial
Duration: 10:28
3,786 views
56


Learn more advanced front-end and full-stack development at: https://www.fullstackacademy.com

setInterval() and requestAnimationFrame() are methods for running animations in the browser. setInterval() calls functions or evaluates expressions at specified intervals. requestAnimationFrame() allows developers to render new changes to the DOM based on the function it is invoked with. This tutorial will go over the primary differences between setInterval and requestAnimationFrame and will show you how to make an animation with each one.

Watch this video to learn:

- When to use setInterval or requestAnimationFrame
- How to create custom setInterval and setTimeout functions using requestAnimationFrame
- The pros and cons involved in the process







Tags:
animations
setInterval
setInterval tutorial
requestAnimationFrame