# Web Animations and the Animate Method | kirupa.com

**URL:** https://forum.kirupa.com/t/web-animations-and-the-animate-method-kirupa-com/603860
**Category:** programming
**Created:** [April 5, 2015, 3:50am UTC](https://forum.kirupa.com/t/web-animations-and-the-animate-method-kirupa-com/603860 "2015-04-05T03:50:15Z")
**Posts on this page:** 5
**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: [April 5, 2015, 3:50am UTC](https://forum.kirupa.com/t/web-animations-and-the-animate-method-kirupa-com/603860/1 "2015-04-05T03:50:15Z")

</div>

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

Today, you have three very distinct approaches for animating things on the web: [CSS animations](http://www.kirupa.com/html5/all_about_css_animations.htm), [CSS transitions](http://www.kirupa.com/html5/all_about_css_transitions.htm), and [requestAnimationFrame](http://www.kirupa.com/html5/animating_with_requestAnimationFrame.htm). This distinction is necessary given what each approach does:

* * *
This is a companion discussion topic for the original entry at [http://www.kirupa.com/html5/web\_animations\_animate\_method.htm](http://www.kirupa.com/html5/web_animations_animate_method.htm)

---

<div class="post-metadata">

### Author: ![krilnon](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/krilnon/32/34_2.png) [@krilnon](https://forum.kirupa.com/u/krilnon)
#### Post date: [April 5, 2015, 8:12pm UTC](https://forum.kirupa.com/t/web-animations-and-the-animate-method-kirupa-com/603860/2 "2015-04-05T20:12:21Z")

</div>

It’s interesting to see CSS in a string as a property value be blessed as the official way to do something in an API. (Versus something like CSSStyleDeclaration.)

Looks like all of the concessions made to make this stuff runnable off of the main thread mean that you can’t use this to make dynamic animations, unless you re-apply them constantly, which would defeat the purpose.

---

<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: [September 23, 2015, 7:13pm UTC](https://forum.kirupa.com/t/web-animations-and-the-animate-method-kirupa-com/603860/3 "2015-09-23T19:13:32Z")

</div>

What do you mean by dynamic animations? One where you update the values of the animation as it is running?

😄

---

<div class="post-metadata">

### Author: ![krilnon](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/krilnon/32/34_2.png) [@krilnon](https://forum.kirupa.com/u/krilnon)
#### Post date: [September 24, 2015, 5:36am UTC](https://forum.kirupa.com/t/web-animations-and-the-animate-method-kirupa-com/603860/4 "2015-09-24T05:36:06Z")

</div>

Yes, I think that’s what I meant. I was keying off your mention of the “main thread”, which to me translates as: there’s a bunch of interdependency between your single main thread of JS and some DOM stuff, or event stuff. CSS animations can be fast in the same sense that separate processes can be fast, or fibers can be fast, or FPGAs can be fast, etc. It’s cool to be fast, but you’re often giving up quite a bit in return.

---

<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: [September 27, 2015, 11:34pm UTC](https://forum.kirupa.com/t/web-animations-and-the-animate-method-kirupa-com/603860/5 "2015-09-27T23:34:16Z")

</div>

Yep - that is true! The best you can do, as you suggest, is reset and re-apply the entire animation with a whole new set of values 😄
