Skip to content

Commit ee23476

Browse files
committed
[web-animations-1][editorial] Proper dfns for the timing model and animation model.
Also better cross-linking.
1 parent d87d19b commit ee23476

File tree

1 file changed

+48
-45
lines changed

1 file changed

+48
-45
lines changed

web-animations-1/Overview.bs

Lines changed: 48 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -459,39 +459,41 @@ Specification conventions {#spec-conventions}
459459
Web Animations model overview {#web-animations-model-overview}
460460
=============================
461461

462-
<div class=informative-bg>
463-
<em>This section is non-normative</em>
464-
465462
At a glance, the [=Web Animations model=] consists
466463
of two largely independent pieces:
467-
a <em>timing model</em> and an <em>animation model</em>.
464+
a [=timing model=] and an [=animation model=].
468465
The roles of these pieces are as follows:
469466

470-
: Timing model
467+
: <dfn id="timing-model-dfn">timing model</dfn>
471468
::
472469
Takes a moment in time and converts it to a proportional distance
473470
within a single iteration of an animation,
474-
called the <em>iteration progress</em>.
475-
The <em>iteration index</em> is also recorded
471+
called the [=iteration progress=].
472+
The current [=iteration index=] is also recorded
476473
since some animations vary each time they repeat.
474+
The [=Web Animations timing model=] is defined in [[#timing-model]].
477475

478-
: Animation model
476+
: <dfn id="animation-model-dfn">animation model</dfn>.
479477
::
480-
Takes the <em>iteration progress</em> and <em>iteration index</em> values
481-
produced by the timing model
482-
and converts them into a series of values
483-
to apply to the target properties.
478+
Takes the [=iteration progress=] and [=iteration index=] values
479+
produced by the [=timing model=]
480+
and converts them into a series of corresponding values
481+
to apply to the [=target properties=].
482+
The [=Web Animations animation model=] is defined in [[#animation-model]].
483+
484+
<div class=informative-bg>
485+
<em>This section is non-normative</em>
484486

485487
Graphically, this flow can be represented as follows:
486488
<figure>
487489
<img src="images/timing-and-animation-models.svg" width="600"
488490
alt="Overview of the operation of the Web Animations model.">
489491
<figcaption>
490-
Overview of the operation of the Web Animations model.<br>
491-
The current time is input to the timing model
492-
which produces an iteration progress value and an iteration index.<br>
493-
These parameters are used as input to the animation model
494-
which produces the property values to apply.
492+
Overview of the operation of the [=Web Animations model=].<br>
493+
The current time is input to the [=timing model=]
494+
which produces an [=iteration progress=] value and an [=iteration index=].<br>
495+
These parameters are used as input to the [=animation model=]
496+
which produces the [=target property=] values to apply.
495497
</figcaption>
496498
</figure>
497499

@@ -502,14 +504,14 @@ Web Animations model overview {#web-animations-model-overview}
502504
* takes 2 seconds every time, and
503505
* changes the width of a rectangle from 50 pixels to 100 pixels.
504506

505-
The first three points apply to the timing model:
507+
The first three points describe the [=timing model=]:
506508
at a time of 6 seconds, it calculates that the animation should be
507509
half-way through its second iteration
508510
and produces the result 0.5.
509511
The animation model then uses that information to calculate a width.
510512

511-
This specification begins with the timing model
512-
and then proceeds to the animation model.
513+
This specification begins with the [[#timing-model|timing model]]
514+
and then proceeds to the [[#animation-model|animation model]].
513515
</div>
514516

515517
<!--
@@ -526,10 +528,10 @@ Timing model {#timing-model}
526528
============
527529

528530
This section describes and defines the behavior
529-
of the Web Animations timing model.
531+
of the <dfn>Web Animations [=timing model=]</dfn>.
530532

531-
Timing model overview {#timing-model-overview}
532-
---------------------
533+
Timing model characteristics {#timing-model-overview}
534+
----------------------------
533535

534536
<div class=informative-bg>
535537
<em>This section is non-normative</em>
@@ -539,8 +541,8 @@ Timing model overview {#timing-model-overview}
539541

540542
### Stateless ### {#stateless}
541543

542-
The Web Animations timing model operates by taking an input time
543-
and producing an output iteration progress.
544+
The Web Animations [=timing model=] operates by taking an input time
545+
and producing an output [=iteration progress=].
544546
Since the output is based solely on the input time
545547
and is independent of previous inputs,
546548
the model can be described as stateless.
@@ -1988,7 +1990,7 @@ Waiting for the associated effect</h4>
19881990

19891991
<div class=informative-bg>
19901992
The rate of play of an animation can be controlled
1991-
by setting its <em>playback rate</em>.
1993+
by setting its [=playback rate=].
19921994
For example, setting a playback rate of 2 will cause
19931995
the animation's [=animation/current time=]
19941996
to increase at twice the rate of its [=timeline=].
@@ -2070,7 +2072,7 @@ Waiting for the associated effect</h4>
20702072

20712073
In order to produce seamless changes to
20722074
the [=playback rate=] of an [=animation=],
2073-
animation's may have a <dfn>pending playback rate</dfn>
2075+
animations may have a <dfn>pending playback rate</dfn>
20742076
that defines a playback rate to be applied
20752077
after any necessary synchronization has taken place
20762078
(for the case of animations running in a different thread or process).
@@ -2923,9 +2925,9 @@ Repeating {#repeating}
29232925
is called an <dfn>iteration interval</dfn>.
29242926

29252927
Unlike the [=active interval=],
2926-
an animation effect can have multiple [=iteration intervals=]
2928+
an animation effect can have multiple [=iteration intervals=],
29272929
although typically only the interval corresponding
2928-
to the [=current iteration=]
2930+
to the current iteration
29292931
is of interest.
29302932

29312933
The length of a single iteration is called
@@ -3344,9 +3346,10 @@ Core animation effect calculations {#core-animation-effect-calculations}
33443346
1. Return |simple iteration progress|.
33453347

33463348

3347-
### Calculating the current iteration ### {#calculating-the-current-iteration}
3349+
### Calculating the [=current iteration index=] ### {#calculating-the-current-iteration}
33483350

3349-
The <dfn>current iteration</dfn> can be calculated
3351+
The <dfn lt="current iteration index | iteration index">current iteration index</dfn>
3352+
can be calculated
33503353
using the following steps:
33513354

33523355
1. If the [=active time=] is [=unresolved=],
@@ -3431,7 +3434,7 @@ Direction control {#direction-control}
34313434

34323435
: Otherwise,
34333436
::
3434-
1. Let |d| be the [=current iteration=].
3437+
1. Let |d| be the [=current iteration index=].
34353438

34363439
1. If [=playback direction=] is <code>alternate-reverse</code>
34373440
increment |d| by 1.
@@ -3516,14 +3519,14 @@ Animation model {#animation-model}
35163519
<em>This section is non-normative</em>
35173520

35183521
For some kinds of [=animation effects=],
3519-
the Web Animations <em>animation model</em>
3520-
takes the [=iteration progress=] and [=current iteration=] values
3521-
produced by the <em>timing model</em>
3522+
the <dfn>Web Animations [=animation model=]</dfn>
3523+
takes the [=iteration progress=] and [=iteration index=] values
3524+
produced by the [=Web Animations timing model|timing model=]
35223525
and uses them to calculate a corresponding output.
35233526

35243527
The output of each such animation effect
35253528
is then combined with that of others using an [=effect stack=]
3526-
before being applied to the target properties
3529+
before being applied to the [=target properties=]
35273530
(see [[#combining-effects]]).
35283531

35293532
</div>
@@ -3537,7 +3540,7 @@ Introduction {#introduction-to-the-animation-model}
35373540
<dfn lt="target property">target properties</dfn>.
35383541

35393542
Given an [=iteration progress=],
3540-
a [=current iteration=],
3543+
an [=iteration index=],
35413544
and an [=underlying value=],
35423545
an [=animation effect=] produces an <dfn>effect value</dfn>
35433546
for each [=animatable=] [=target property=]
@@ -3902,7 +3905,7 @@ Keyframe effects {#keyframe-effects}
39023905
The [=effect value=] of a single property referenced by a [=keyframe effect=]
39033906
as one of its [=target property|target properties=],
39043907
for a given |iteration progress|,
3905-
<var ignore>current iteration</var>
3908+
<var ignore>iteration index</var>
39063909
and |underlying value|
39073910
is calculated as follows.
39083911

@@ -4093,16 +4096,16 @@ Keyframe effects {#keyframe-effects}
40934096

40944097
<div class=issue>
40954098
In the presence of certain timing functions,
4096-
the input iteration progress to an animation effect
4099+
the input [=iteration progress=] to an animation effect
40974100
is not limited to the range [0, 1].
40984101
Currently, however, keyframe offsets <em>are</em> limited to the range [0, 1]
40994102
and property values are simply extrapolated
4100-
for input iteration progress values outside this range.
4103+
for input [=iteration progress=] values outside this range.
41014104

41024105
We have considered removing this restriction
41034106
since some cases exist where it is useful
41044107
to be able to specify non-linear changes in property values
4105-
at iteration progress values outside the range [0, 1].
4108+
at [=iteration progress=] values outside the range [0, 1].
41064109
One example is an animation that interpolates from green to yellow
41074110
but has an overshoot timing function
41084111
that makes it temporarily interpolate “beyond” yellow to red
@@ -5173,7 +5176,7 @@ The {{AnimationEffect}} interface {#the-animationeffect-interface}
51735176
::
51745177
The [=animation effect=]’s [=iteration start=] property,
51755178
which is a finite real number greater than or equal to zero
5176-
representing the iteration index at which the [=animation effect=] begins
5179+
representing the [=iteration index=] at which the [=animation effect=] begins
51775180
and its progress through that iteration.
51785181

51795182
For example, a value of 0.5 indicates that
@@ -5195,7 +5198,7 @@ The {{AnimationEffect}} interface {#the-animationeffect-interface}
51955198
are typically only useful in combination with an animation effect
51965199
that has an [=iteration composite operation=] of
51975200
<span class="enum-value">accumulate</span>
5198-
or when the [=current iteration=] index is otherwise significant.
5201+
or when the [=current iteration index=] is otherwise significant.
51995202
</div>
52005203

52015204
: <dfn>iterations</dfn>
@@ -5392,7 +5395,7 @@ The {{AnimationEffect}} interface {#the-animationeffect-interface}
53925395

53935396
: <dfn>currentIteration</dfn>
53945397
::
5395-
The [=current iteration=] index
5398+
The [=current iteration index=]
53965399
beginning with zero for the first iteration.
53975400

53985401
In most cases this will be a (positive) integer.
@@ -5401,7 +5404,7 @@ The {{AnimationEffect}} interface {#the-animationeffect-interface}
54015404
the value will be positive <code class=esvalue>Infinity</code>.
54025405

54035406
As with [=unresolved=] times,
5404-
an unresolved [=current iteration=] is represented
5407+
an unresolved [=iteration index=] is represented
54055408
by a `null` value.
54065409

54075410
</div>

0 commit comments

Comments
 (0)