W3C home > Mailing lists > Public > public-fx@w3.org > January to March 2011

Re: [css3-animations] Complex animations

From: Robert O'Callahan <robert@ocallahan.org>
Date: Wed, 30 Mar 2011 08:13:22 +1300
Message-ID: <AANLkTikciDLH9D1unpLVxOmiaPaSnx0ngXeyoZQMh+1K@mail.gmail.com>
To: Rik Cabanier <cabanier@gmail.com>
Cc: Paul Bakaus <pbakaus@zynga.com>, Simon Fraser <simon.fraser@apple.com>, Dean Jackson <dino@apple.com>, "public-fx@w3.org" <public-fx@w3.org>, www-style list <www-style@w3.org>
On Wed, Mar 30, 2011 at 6:30 AM, Rik Cabanier <cabanier@gmail.com> wrote:

> The second part of your problem is a little different. In order to do that,
> you need to have a precise timing event so you can determine if your
> character is colliding with something else.
> Mozilla's proposal could be part of the solution:
> http://hacks.mozilla.org/2010/08/more-efficient-javascript-animations-with-mozrequestanimationframe/
> This proposal lets you call a JS function at precise intervals much like
> Flash's onEnterFrame function. If you combine this with my request to pause
> all animations on the page, you would know the precise state of everything
> in the DOM.

I think requestAnimationFrame is tremendously useful (I helped design it)
but it can't be a complete solution since when animations are carried out
off the HTML5 event loop thread (which you want for smoothness), JS may not
be able to run at the moment the animation finishes.

SMIL animations can easily express what you need to express here. Perhaps we
don't need to make CSS animations cover this use case.

"Now the Bereans were of more noble character than the Thessalonians, for
they received the message with great eagerness and examined the Scriptures
every day to see if what Paul said was true." [Acts 17:11]
Received on Tuesday, 29 March 2011 19:14:56 UTC

This archive was generated by hypermail 2.3.1 : Monday, 22 June 2015 03:33:45 UTC