W3C home > Mailing lists > Public > www-style@w3.org > March 2011

Re: [css3-animations] Complex animations

From: Rik Cabanier <cabanier@gmail.com>
Date: Tue, 29 Mar 2011 15:33:51 -0700
Message-ID: <AANLkTiks6ASPAoszLaUxh+Cby35Q7dbjiii_6xT_W=ye@mail.gmail.com>
To: Simon Fraser <simon.fraser@apple.com>
Cc: robert@ocallahan.org, Paul Bakaus <pbakaus@zynga.com>, Dean Jackson <dino@apple.com>, "public-fx@w3.org" <public-fx@w3.org>, www-style list <www-style@w3.org>
>
> 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.
>>
>
> This is why being able to pause all animations is important.
> I don't think that this will give many issues with smoothness as long as
> you use animations for the bulk of the motion and keep you JavaScript to a
> minimum.
> The Flash player pauses all rendering during its ActionScript phase and
> real world performance of games and animations is fine.
>
>
> WebKit on Safari and iPhone renders some animations on another thread, at
> display-refresh frequency (60fps). Dropped frames are very noticeable with
> such animations. Pausing animations while JS is running is simply not an
> option for us.
>

I'm not suggesting to change the default behavior or pause animations when
any JS runs. You could provide an option to do the pause when you register
an animation event handler so it only happens if you want it to.
When changing animations through JS, there has be a way to freeze the state
of your animation at the c++ level. If not, you can't keep all the separate
animations synchronized and you're better off animating everything through
JavaScript.

As mentioned before, having a declarative syntax for true keyframes is the
best solution. It will also significantly lower the need and complexity of
animation event handlers

Rik
Received on Tuesday, 29 March 2011 22:34:25 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:38 GMT