Skip to content

Commit 4ed21f9

Browse files
committed
[web-animations-1][editorial] Move section
The most fundamental function of an Animation is moderating the flow of time from the timeline to the Animation Effect. Understanding how this works is the most important thing, so pull it up.
1 parent f77c937 commit 4ed21f9

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

web-animations-1/Overview.bs

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,38 @@ Animations {#animations}
892892
may provide alternative means of ordering animations
893893
(see [[#animation-classes]]).
894894

895+
### Calculating the current time of an animation ### {#the-current-time-of-an-animation}
896+
897+
The [=animation/current time=] of an [=animation=] is calculated from
898+
the first matching condition below:
899+
900+
<dl class=switch>
901+
902+
: If the animation's [=hold time=] is [=unresolved|resolved=],
903+
::
904+
The [=animation/current time=] is the animation's [=hold time=].
905+
906+
: If <em>any</em> of the following are true:
907+
* the animation has no associated [=timeline=], or
908+
* the associated [=timeline=] is [=inactive timeline|inactive=], or
909+
* the animation's [=start time=] is [=unresolved=],
910+
::
911+
The [=animation/current time=] is an [=unresolved=] time value.
912+
913+
: Otherwise,
914+
::
915+
<blockquote>
916+
<code><a for="animation">current time</a> =
917+
(<var>timeline time</var><a>start time</a>)
918+
× <a>playback rate</a></code>
919+
</blockquote>
920+
921+
Where |timeline time| is the current [=time value=]
922+
of the associated [=timeline=].
923+
The [=playback rate=] value is defined in [[#speed-control]].
924+
925+
</dl>
926+
895927
### Setting the timeline of an animation ### {#setting-the-timeline}
896928

897929
<div algorithm>
@@ -962,38 +994,6 @@ Setting the associated effect of an animation</h4>
962994

963995
</div>
964996

965-
### Calculating the current time of an animation ### {#the-current-time-of-an-animation}
966-
967-
The [=animation/current time=] is calculated from
968-
the first matching condition below:
969-
970-
<dl class=switch>
971-
972-
: If the animation's [=hold time=] is [=unresolved|resolved=],
973-
::
974-
The [=animation/current time=] is the animation's [=hold time=].
975-
976-
: If <em>any</em> of the following are true:
977-
* the animation has no associated [=timeline=], or
978-
* the associated [=timeline=] is [=inactive timeline|inactive=], or
979-
* the animation's [=start time=] is [=unresolved=],
980-
::
981-
The [=animation/current time=] is an [=unresolved=] time value.
982-
983-
: Otherwise,
984-
::
985-
<blockquote>
986-
<code><a for="animation">current time</a> =
987-
(<var>timeline time</var><a>start time</a>)
988-
× <a>playback rate</a></code>
989-
</blockquote>
990-
991-
Where |timeline time| is the current [=time value=]
992-
of the associated [=timeline=].
993-
The [=playback rate=] value is defined in [[#speed-control]].
994-
995-
</dl>
996-
997997
### Setting the current time of an animation ### {#setting-the-current-time-of-an-animation}
998998

999999
The [=animation/current time=] of an [=animation=] can be set to a new value

0 commit comments

Comments
 (0)