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

Re: [css3-animations] Complex animations

From: Dean Jackson <dino@apple.com>
Date: Tue, 29 Mar 2011 05:20:28 +1100
Cc: Paul Bakaus <pbakaus@zynga.com>, Rik Cabanier <cabanier@gmail.com>, public-fx@w3.org, www-style list <www-style@w3.org>
Message-id: <9CA42993-830C-4AAB-BA2D-7268AB1E3A6D@apple.com>
To: Chris Marrin <cmarrin@apple.com>

On 29/03/2011, at 5:12 AM, Chris Marrin wrote:

> On Mar 28, 2011, at 9:24 AM, Dean Jackson wrote:
>> One though we have to get around this particular issue is to add a property such as
>> animation-trigger: [some way to reference an animation on an element]
>> that would set the start time of an animation to the end of the referenced animation. SMIL supports this nicely, even with simple expressions, but has the advantage that animations apply over the entire document (not just when particular style rules apply). SMIL also handles synchronisation of animations explicitly.
>> An issue we (Apple) have noticed over the years implementing animation is that in many cases the author would prefer not to have the animation jump past its first few frames. Unfortunately, the start of an animation may require a re-layout which means that the pause may be significant and cause obvious stutters.
> Yeah, you get over constrained if you want both to see every animation frame and to sync animations. We added some logic to WebKit that allows us to synchronize any animation or transition started from the same event cascade at the same time. This is keyed to the rendering of the contents of the layers that are to be animated (assuming some or all of the animations are in layers). So all animation, both layered and non-layered will be synchronized. 
> It works pretty well for synchronizing a bunch of animations that are used to build up or tear down some part of the presentation. And you can use animation-delay to enable you to synchronize animations with different relative start times. But that doesn't help you if you want to trigger animations from something other than the start of another. 
> I like the idea of animation-trigger, but I don't think it would be enough to trigger just off of the end of an animation. There are many time points that would make interesting triggers. One of the most useful would be triggering at some amount of time before some event is to occur. That's not possible with user events (yet :-) but for things like animation end or iteration you know when they will occur, so triggering at some fixed time before this would be easy. Even more useful would be the ability to trigger on the end of media playback. That way you can say, "I want to trigger 5 seconds before this video ends", and you'll get the right trigger whether the video is 10 seconds or 10 minutes long.

This is exactly what SMIL allows. begin="someotheranimation.end - 5s"
I was hoping that animation-trigger could do something similar.

In the case of non-iteractive animations that are really more like scripted movies or cartoons, then SMIL is ok. End the hate!! :)

Received on Monday, 28 March 2011 18:22:25 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:49:38 UTC