# Animating with requestAnimationFrame

**URL:** <https://forum.kirupa.com/t/animating-with-requestanimationframe/636217>\
**Category:** programming\
**Created:** [March 20, 2017, 3:51am UTC](https://forum.kirupa.com/t/animating-with-requestanimationframe/636217 "2017-03-20T03:51:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [March 20, 2017, 3:51am UTC](https://forum.kirupa.com/t/animating-with-requestanimationframe/636217/1 "2017-03-20T03:51:46Z")

</div>

by [kirupa](http://www.kirupa.com/www.kirupa.com/me/index.htm) | 22 October 2015

When you are creating an animation, it goes without saying that you want your animation to run smoothly and fluidly when someone is viewing it. If you are using [CSS Animations](http://www.kirupa.com/www.kirupa.com/html5/creating_simple_css_animation.htm), then you have nothing to worry about. Your browser takes care of everything for you. If you are creating your animation using JavaScript, things are a bit different. Instead of the browser giving you some assistance, you are left [on your own](http://www.kirupa.com/www.kirupa.com/html5/frame_rates_html_javascript.htm). It is up to you to make sure your animation runs smoothly while at the same time taking into account the various factors that could affect your animation's performance. Factors such as other things happening on the page. Factors such as your laptop / phone / tablet going into battery mode and halving its performance reduced. Factors such as another tab taking focus. You get the point.

* * *
This is a companion discussion topic for the original entry at [http://www.kirupa.com/html5/animating\_with\_requestAnimationFrame.htm](http://www.kirupa.com/html5/animating_with_requestAnimationFrame.htm)

---

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [March 21, 2017, 4:03pm UTC](https://forum.kirupa.com/t/animating-with-requestanimationframe/636217/2 "2017-03-21T16:03:45Z")

</div>

A collection of requestAnimationFrame-related topics that have come up:

1. [When does requestAnimationFrame actually run?](http://forum.kirupa.com/t/js-animation-requestanimationframe/636264)

We’ll keep updating this as more topics come up 🙂

Cheers,  
Kirupa
