Skip to content

Commit 653c7d2

Browse files
committed
[web-animations-1][editorial] Revise animation dfn / intro
* Don't state the child relationship of animations to timelines as its informative definition; this is really confusing. It's not what an animation *is*, it's a side effect of the hierarchy. * Move the nice, readable, understandable definition of what an animation effect is to the definition of animation effect, where it's desperately needed! * Merge the remaining non-normative and normative definitions, which are half-duplicating each other already. * Pull up the definition of “current time”, because it's quite fundamental here. * Add a note about timeline vs animation notions of current time. * Split up the definition of animation into logical paragraphs: 1. binding effect and timeline (most fundamental) 2. Role in time value flow 3. Playback control features to manipulate said flow * Reorganize the remaining paragraphs into a DL. * Dfn-tag “seek” and cross-link it throughout
1 parent cb58f74 commit 653c7d2

File tree

1 file changed

+57
-50
lines changed

1 file changed

+57
-50
lines changed

web-animations-1/Overview.bs

Lines changed: 57 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ Use cases {#use-cases}
277277

278278
: Controlling running animations
279279
::
280-
It is sometimes useful to perform playback control on animations
280+
It is sometimes useful to perform [=playback control=] on animations
281281
so that they can respond to external inputs.
282282
For example, it might be necessary to pause all existing animations
283283
before displaying a modal dialog
@@ -825,47 +825,57 @@ Timelines {#timelines}
825825
Animations {#animations}
826826
----------
827827

828-
<div class=informative-bg>
829-
<em>This section is non-normative</em>
830-
831-
The children of a [=timeline=] are called <em>animations</em>.
832-
An animation takes an [=animation effect=],
833-
which is a static description of some timed behavior,
834-
and binds it to a [=timeline=]
835-
so that it runs.
836-
An animation also allows run-time control
837-
of the connection between the [=animation effect=] and its [=timeline=]
838-
by providing pausing, seeking, and speed control.
839-
The relationship between an animation and an [=animation effect=]
840-
is analogous to that of a DVD player and a DVD.
841-
</div>
842-
843828
An <dfn export id="concept-animation">animation</dfn>
844-
connects a single [=animation effect=],
829+
is a [=timing node=] that
830+
binds an [=animation effect=] child,
845831
called its <dfn export for=animation>associated effect</dfn>,
846-
to a [=timeline=] and provides playback control.
832+
to a [=timeline=] parent so that it runs.
847833
Both of these associations are optional and configurable
848834
such that an [=animation=] can have
849835
no [=associated effect=] or [=timeline=] at a given moment.
850836

851-
An [=animation's=] <dfn export for=animation>document for timing</dfn>
852-
is the {{Document}} with which its [=timeline=] is
853-
[=timeline associated with a document|associated=].
854-
If an animation is not associated with a timeline,
855-
or its timeline is not associated with a document,
856-
then it has no [=document for timing=].
857-
858-
An [=animation=]’s <dfn export for=animation>start time</dfn>
859-
is the [=time value=] of its [=timeline=]
860-
when its [=associated effect=] is scheduled to begin playback.
861-
An animation's start time is initially [=unresolved=].
862-
863-
An [=animation=] also maintains
864-
a <dfn export for=animation>hold time</dfn> [=time value=]
865-
which is used to fix the animation's output [=time value=],
866-
called its [=animation/current time=],
867-
in circumstances such as pausing.
868-
The [=hold time=] is initially [=unresolved=].
837+
[=Animations=] also allow run-time control of the connection
838+
between the [=animation effect=] and its [=timeline=],
839+
through <dfn>playback control</dfn> functions such as
840+
[[#pausing-an-animation-section|pausing]],
841+
[[#setting-the-current-time-of-an-animation|seeking]],
842+
and [[#speed-control|speed control]].
843+
844+
[=Time values=] flow from the [=timeline=] through the [=animation=]
845+
to the [=associated effect=].
846+
The [=time value=] provided to an [=animation=]’s [=associated effect=]
847+
is called the [=animation=]’s <dfn export for=animation>current time</dfn>.
848+
849+
Note: The relationship between an animation and an [=animation effect=]
850+
is analogous to that of a DVD player and a DVD.
851+
852+
In addition to its [=timeline=], [=associated effect=],
853+
and [=animation/current time=]
854+
an [=animation=] has the following:
855+
856+
<dl export dfn-for="animation">
857+
: <dfn>document for timing</dfn>
858+
::
859+
The {{Document}} with which the [=animation=]’s [=timeline=] is
860+
[=timeline associated with a document|associated=].
861+
If an animation is not associated with a timeline,
862+
or its timeline is not associated with a document,
863+
then it has no [=document for timing=].
864+
865+
: <dfn>start time</dfn>
866+
::
867+
The [=time value=] of its [=timeline=]
868+
when its [=associated effect=] is scheduled to begin playback.
869+
An animation's start time is initially [=unresolved=].
870+
871+
: <dfn>hold time</dfn>
872+
::
873+
A [=time value=],
874+
which is used to freeze the animation's [=animation/current time=] output
875+
in circumstances such as pausing.
876+
The [=hold time=] is initially [=unresolved=].
877+
878+
</dl>
869879

870880
In order to establish the relative ordering of conflicting [=animations=],
871881
animations are appended to a <dfn export>global animation list</dfn>
@@ -944,10 +954,7 @@ Setting the associated effect of an animation</h4>
944954

945955
</div>
946956

947-
### The current time of an animation ### {#the-current-time-of-an-animation}
948-
949-
[=Animations=] provide a [=time value=] to their [=associated effect=]
950-
called the animation's <dfn export for=animation>current time</dfn>.
957+
### Calculating the current time of an animation ### {#the-current-time-of-an-animation}
951958

952959
The [=animation/current time=] is calculated from
953960
the first matching condition below:
@@ -981,8 +988,8 @@ Setting the associated effect of an animation</h4>
981988

982989
### Setting the current time of an animation ### {#setting-the-current-time-of-an-animation}
983990

984-
The [=animation/current time=] of an animation can be set to a new value
985-
to <em>seek</em> the animation.
991+
The [=animation/current time=] of an [=animation=] can be set to a new value
992+
to <dfn>seek</dfn> the animation.
986993
The procedure for setting the current time is defined in two parts.
987994

988995
<div algorithm>
@@ -1576,14 +1583,14 @@ Waiting for the associated effect</h4>
15761583
</figcaption>
15771584
</figure>
15781585

1579-
It is possible, however, to <em>seek</em>
1586+
It is possible, however, to [=seek=]
15801587
the [=animation/current time=] of an [=animation=]
15811588
to a time past the end of the [=associated effect=].
15821589
When doing so, the current time will not progress
15831590
but the animation will act as if it had been paused
15841591
at the seeked time.
15851592

1586-
This allows, for example, seeking
1593+
This allows, for example, [=seeking=]
15871594
the [=animation/current time=] of an animation
15881595
with <em>no</em> [=associated effect=] to 5s.
15891596
If [=associated effect=] with an [=end time=] later than 5s
@@ -1641,7 +1648,7 @@ Waiting for the associated effect</h4>
16411648
Whilst during normal playback
16421649
the [=animation/current time=] of an [=animation=]
16431650
is limited to the boundaries described above,
1644-
it is possible to seek the current time of an animation
1651+
it is possible to [=seek=] the current time of an animation
16451652
to times outside those boundaries
16461653
using the procedure to [=set the current time=] of an animation.
16471654

@@ -2447,8 +2454,8 @@ Waiting for the associated effect</h4>
24472454
Animation effects {#animation-effects}
24482455
-----------------
24492456

2450-
An <dfn>animation effect</dfn> is an abstract term
2451-
referring to an item in the timing hierarchy.
2457+
An <dfn>animation effect</dfn> is a [=timing node=]
2458+
that provides a static description of some timed behavior.
24522459

24532460
### Relationship between animation effects and animations ### {#animation-effects-and-animations}
24542461

@@ -4785,7 +4792,7 @@ The {{Animation}} interface {#the-animation-interface}
47854792

47864793
: <dfn lt="finish()">void finish()</dfn>
47874794
::
4788-
Seeks the animation to
4795+
[=Seeks=] the animation to
47894796
the [=associated effect end=] in the current direction
47904797
by running the [=finish an animation=] procedure
47914798
for this object.
@@ -4837,7 +4844,7 @@ The {{Animation}} interface {#the-animation-interface}
48374844
As with {{Animation/play()}},
48384845
this method unpauses the animation and,
48394846
if the animation has already finished playing in the reversed direction,
4840-
seeks to the start of the [=associated effect=].
4847+
[=seeks=] to the start of the [=associated effect=].
48414848

48424849
: <dfn lt="persist()">void persist()</dfn>
48434850
::
@@ -6933,7 +6940,7 @@ Model liveness {#model-liveness}
69336940
: Changes made to the [=Web Animations model=] take effect immediately
69346941
::
69356942
For example, if the {{KeyframeEffect}} associated with an {{Animation}}
6936-
is seeked (see [[#setting-the-current-time-of-an-animation]])
6943+
is [=seeked=] (see [[#setting-the-current-time-of-an-animation]])
69376944
via the [=Web Animations API=],
69386945
the value returned when querying the animation's <code>startTime</code>
69396946
will reflect updated state of the model immediately.

0 commit comments

Comments
 (0)