Re: [web-animations] Web Animations minutes, 2 Oct 2014

On Fri, Oct 3, 2014 at 11:26 AM, Brian Birtles <bbirtles@mozilla.com> wrote:
> ----- Original Message -----
>> From: "Tab Atkins Jr." <jackalmage@gmail.com>
> ...
>> On Thu, Oct 2, 2014 at 8:21 PM, Brian Birtles <bbirtles@mozilla.com> wrote:
>> > 11. SUPPORT NEGATIVE INFINITY DELAY WITH INFINITE REPETITION?
>> > =============================================================
>> > (Brian)
>> >
>> > https://bugzilla.mozilla.org/show_bug.cgi?id=1043156
>> >
>> > Shane: seems reasonable to be able to define an animation that runs forever
>> > and has always been running. So long as it takes into account
>> > iterationStart
>> > so that at currentTime 0 it lines up with iterationStart.
>> >
>> > Brian: we'd have to change delay and startTime to be unrestricted doubles?
>> >
>> > Shane: Probably ok.
>>
>> This doesn't work, since you can't tell what your .currentIteration
>> value is (it's Infinity, since we don't implement transfinites), nor
>> how far through that iteration you are.
>
> Right, the current iteration is always positive infinity (that's the proposal in the bug anyway). We already have infinite currentIteration values for zero-duration animations that repeat forever so that's not out of the question--but it does break accumulating behavior and would mean special handling is needed for alternating behavior.

zero-duration, infinite iteration animations end immediately, so
they're not a big deal; you can't catch them *while* they're
executing, so you can't see .currentIteration set to anything weird.

What I was more concerned about is that .currentIteration would be
Infinity for *every* observable iteration.  You can't do Infinity+1,
Infinity+2, etc.

> With regards to working out your position in an iteration, I think it depends if you allow the start time or the delay to be negative infinity. I think it's probably better to only allow the delay (since that applies to the animation which is also where you'd set the infinitely repeating behavior; and it means we don't end up with infinite current times in the player).

I don't understand how limiting the infinite behavior to just delay
helps.  A negative infinity delay means the animation is treated as
having started infinity ago, and so there's still no way to tell how
far you are into the current iteration that's executing at the current
moment.

> For delay we discussed calculating the time fraction by lining up the iterations so that animation local time zero corresponds to iterationStart.

Okay, that's a valid solution to the "progess in current iteration" problem.

> I think there's a fair bit of extra spec work involved to make that happen, but I think it's possible?

Possible, probably, but I'm unsure it's worthwhile.  Is this just to
make it so that authors don't have to care as much about some
calculations possibly returning Infinity?

~TJ

Received on Friday, 3 October 2014 15:50:13 UTC