Skip to content

Commit

Permalink
[web-animations-1] Inline active duration calculation into definition.
Browse files Browse the repository at this point in the history
  • Loading branch information
fantasai committed Aug 22, 2023
1 parent 4dce6d1 commit 61da22e
Showing 1 changed file with 31 additions and 30 deletions.
61 changes: 31 additions & 30 deletions web-animations-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2602,23 +2602,15 @@ Animation effects {#animation-effects}
will never return a negative value.
</div>

### The active interval, duration, and delays ### {#the-active-interval}
### The active interval ### {#the-active-interval}

[=Animation effects=] define an <dfn>active interval</dfn>,
which is the period of time during which the effect
is scheduled to produce its effect
(excepting [=fill modes=],
which apply outside the [=active interval=]).
Each [=animation effect=] has only one such interval.

The lower bound of the [=active interval=]
by default corresponds to the [=start time=] of the [=associated animation=],
but can be shifted by the <dfn>start delay</dfn>,
which is a signed offset from the [=start time=] of the [=animation=].

The length of the [=active interval=] is called the <dfn>active duration</dfn>,
the calculation of which is defined in [[#calculating-the-active-duration]].
Its length determines the upper bound of the [=active interval=].
Each [=animation effect=] has only one such interval,
which is defined by its [=start delay=] and [=active duration=].

<div class=informative-bg>

Expand Down Expand Up @@ -2646,6 +2638,34 @@ Animation effects {#animation-effects}
</figure>
</div>

#### The start delay #### {#the-start-delay}

The lower bound of the [=active interval=]
by default corresponds to the [=start time=] of the [=associated animation=],
but can be shifted by the <dfn>start delay</dfn>,
which is a signed offset from the [=start time=] of the [=animation=].

#### The active duration #### {#the-active-duration}

The length of the [=active interval=] is called the <dfn>active duration</dfn>,
and is determined by the [=iteration duration=] and [=iteration count=]
as defined below.
Its length determines the upper bound of the [=active interval=].

<blockquote id="calculating-the-active-duration">
[=active duration=] =
<code><a>iteration duration</a> × <a>iteration count</a></code>
</blockquote>

If either the [=iteration duration=] or [=iteration count=] are zero,
the [=active duration=] is zero.

Note: This clarification is needed
since the result of infinity multiplied by zero
is undefined according to IEEE 754-2008.

#### The end delay and animation effect end time #### {#the-end-delay}

Similar to the [=start delay=],
an [=animation effect=] also has an <dfn>end delay</dfn>,
which is primarily of use when sequencing one [=animation effect=]
Expand Down Expand Up @@ -3165,22 +3185,6 @@ Animation effects {#animation-effects}

</div>

#### Calculating the active duration #### {#calculating-the-active-duration}

The [=active duration=] is calculated as follows:

<blockquote>
[=active duration=] =
<code><a>iteration duration</a> × <a>iteration count</a></code>
</blockquote>

If either the [=iteration duration=] or [=iteration count=] are zero,
the [=active duration=] is zero.

Note: This clarification is needed
since the result of infinity multiplied by zero
is undefined according to IEEE 754-2008.

### Direction control ### {#direction-control}

[=Animation effects=] can also be configured
Expand Down Expand Up @@ -3273,9 +3277,6 @@ Calculating progress {#core-animation-effect-calculations}
</figcaption>
</figure>

The process for calculating the [=active duration=]
is normatively defined in [[#calculating-the-active-duration]].

Having established the [=active duration=],
the process for transforming an [=animation effect=]’s [=local time=]
into its [=transformed progress=] ([=iteration progress=])
Expand Down

0 comments on commit 61da22e

Please sign in to comment.