@@ -2868,8 +2868,7 @@ Animation effects {#animation-effects}
28682868 </div>
28692869
28702870
2871- Fill behavior and fill modes {#fill-behavior}
2872- ----------------------------
2871+ ### Fill behavior and fill modes ### {#fill-behavior}
28732872
28742873 The effect of an [=animation effect=] when it is not [=in play=]
28752874 is determined by its <dfn>fill mode</dfn> .
@@ -3010,10 +3009,9 @@ Fill behavior and fill modes {#fill-behavior}
30103009 inside the [=animation effect/active phase=]
30113010 <em> or</em> when a fill is applied.
30123011
3013- Repeating {#repeating}
3014- ---------
3012+ ### Repeating ### {#repeating}
30153013
3016- ### Iteration intervals ### {#iteration-intervals}
3014+ #### Iteration intervals # ### {#iteration-intervals}
30173015
30183016 It is possible to specify that an animation effect should repeat
30193017 a fixed number of times or indefinitely.
@@ -3063,7 +3061,7 @@ Repeating {#repeating}
30633061 </figure>
30643062</div>
30653063
3066- ### Controlling iteration ### {#controlling-iteration}
3064+ #### Controlling iteration # ### {#controlling-iteration}
30673065
30683066 The number of times an [=animation effect=] repeats
30693067 is called its <dfn>iteration count</dfn> .
@@ -3114,7 +3112,7 @@ Repeating {#repeating}
31143112
31153113</div>
31163114
3117- ### Interval timing ### {#interval-timing}
3115+ #### Interval timing # ### {#interval-timing}
31183116
31193117<div class=informative-bg>
31203118<em> This section is non-normative</em>
@@ -3167,8 +3165,83 @@ Repeating {#repeating}
31673165
31683166</div>
31693167
3170- Core animation effect calculations {#core-animation-effect-calculations}
3171- ----------------------------------
3168+ #### Calculating the active duration #### {#calculating-the-active-duration}
3169+
3170+ The [=active duration=] is calculated as follows:
3171+
3172+ <blockquote>
3173+ [=active duration=] =
3174+ <code> <a>iteration duration</a> × <a>iteration count</a> </code>
3175+ </blockquote>
3176+
3177+ If either the [=iteration duration=] or [=iteration count=] are zero,
3178+ the [=active duration=] is zero.
3179+
3180+ Note: This clarification is needed
3181+ since the result of infinity multiplied by zero
3182+ is undefined according to IEEE 754-2008.
3183+
3184+ ### Direction control ### {#direction-control}
3185+
3186+ [=Animation effects=] can also be configured
3187+ to run iterations in alternative directions
3188+ using direction control.
3189+ For this purpose, [=animation effects=] have
3190+ a <dfn>playback direction</dfn> parameter
3191+ which takes one of the following values:
3192+
3193+ * normal,
3194+ * reverse,
3195+ * alternate, or
3196+ * alternate-reverse.
3197+
3198+ The semantics of these values are incorporated into
3199+ the calculation of the [=directed progress=] which follows.
3200+
3201+ <div class=informative-bg>
3202+ <em> This section is non-normative</em>
3203+
3204+ A non-normative definition of these values is as follows:
3205+
3206+ : normal
3207+ ::
3208+ All iterations are played as specified.
3209+
3210+ : reverse
3211+ ::
3212+ All iterations are played in the reverse direction
3213+ from the way they are specified.
3214+
3215+ : alternate
3216+ ::
3217+ Even iterations are played as specified;
3218+ odd iterations are played in the reverse direction
3219+ from the way they are specified.
3220+
3221+ : alternate-reverse
3222+ ::
3223+ Even iterations are played in the reverse direction
3224+ from the way they are specified;
3225+ odd iterations are played as specified.
3226+
3227+ </div>
3228+
3229+ ### Time transformations ### {#time-transformations}
3230+
3231+ It is often desirable to control the rate
3232+ at which an [=animation effect=] progresses.
3233+ For example, easing the rate of animation
3234+ can create a sense of momentum and produce a more natural effect.
3235+ The CSS Easing Functions Module [[!CSS-EASING-1]]
3236+ defines [=timing functions=] for this purpose.
3237+
3238+ [=Animation effects=] have
3239+ one [=timing function=] associated with them.
3240+ The default [=timing function=]
3241+ is the [=linear timing function=] .
3242+
3243+ Calculating progress {#core-animation-effect-calculations}
3244+ --------------------
31723245
31733246### Overview ### {#animation-effect-calculations-overview}
31743247
@@ -3227,32 +3300,11 @@ Core animation effect calculations {#core-animation-effect-calculations}
32273300
32283301 The first step, calculating the [=local time=]
32293302 is described in [[#local-time-section]] .
3230- Steps 2 to 4 in the diagram are described in the following sections.
3231- Steps 5 and 6 are described in [[#calculating-the-directed-progress]]
3232- and [[#calculating-the-transformed-progress]] respectively.
3303+ Steps 2 to 6 in the diagram are described in the following sections.
32333304
32343305</div>
32353306
3236-
3237- ### Calculating the active duration ### {#calculating-the-active-duration}
3238-
3239- The [=active duration=] is calculated as follows:
3240-
3241- <blockquote>
3242- [=active duration=] =
3243- <code> <a>iteration duration</a> × <a>iteration count</a> </code>
3244- </blockquote>
3245-
3246- If either the [=iteration duration=] or [=iteration count=] are zero,
3247- the [=active duration=] is zero.
3248-
3249- Note: This clarification is needed
3250- since the result of infinity multiplied by zero
3251- is undefined according to IEEE 754-2008.
3252-
3253- ### Transforming the local time ### {#transforming-the-local-time}
3254-
3255- #### Calculating the active time #### {#calculating-the-active-time}
3307+ ### Calculating the active time ### {#calculating-the-active-time}
32563308
32573309 The <dfn>active time</dfn> is based on the [=local time=] and [=start delay=] .
32583310 However, it is only defined
@@ -3307,7 +3359,7 @@ Core animation effect calculations {#core-animation-effect-calculations}
33073359
33083360 </dl>
33093361
3310- #### Calculating the overall progress # ### {#calculating-the-overall-progress}
3362+ ### Calculating the overall progress ### {#calculating-the-overall-progress}
33113363
33123364 The <dfn>overall progress</dfn> describes
33133365 the number of iterations that have completed (including partial iterations)
@@ -3338,7 +3390,7 @@ Core animation effect calculations {#core-animation-effect-calculations}
33383390 <code><var> overall progress</var> + <a>iteration start</a> </code> .
33393391
33403392
3341- #### Calculating the simple iteration progress # ### {#calculating-the-simple-iteration-progress}
3393+ ### Calculating the simple iteration progress ### {#calculating-the-simple-iteration-progress}
33423394
33433395 The <dfn>simple iteration progress</dfn>
33443396 is a fraction of the progress through the current iteration
@@ -3404,52 +3456,6 @@ Core animation effect calculations {#core-animation-effect-calculations}
34043456
34053457 1. Otherwise, return <code> floor(<a>overall progress</a> )</code> .
34063458
3407- Direction control {#direction-control}
3408- -----------------
3409-
3410- [=Animation effects=] can also be configured
3411- to run iterations in alternative directions
3412- using direction control.
3413- For this purpose, [=animation effects=] have
3414- a <dfn>playback direction</dfn> parameter
3415- which takes one of the following values:
3416-
3417- * normal,
3418- * reverse,
3419- * alternate, or
3420- * alternate-reverse.
3421-
3422- The semantics of these values are incorporated into
3423- the calculation of the [=directed progress=] which follows.
3424-
3425- <div class=informative-bg>
3426- <em> This section is non-normative</em>
3427-
3428- A non-normative definition of these values is as follows:
3429-
3430- : normal
3431- ::
3432- All iterations are played as specified.
3433-
3434- : reverse
3435- ::
3436- All iterations are played in the reverse direction
3437- from the way they are specified.
3438-
3439- : alternate
3440- ::
3441- Even iterations are played as specified;
3442- odd iterations are played in the reverse direction
3443- from the way they are specified.
3444-
3445- : alternate-reverse
3446- ::
3447- Even iterations are played in the reverse direction
3448- from the way they are specified;
3449- odd iterations are played as specified.
3450-
3451- </div>
3452-
34533459### Calculating the directed progress ### {#calculating-the-directed-progress}
34543460
34553461 The <dfn>directed progress</dfn> is calculated
@@ -3493,21 +3499,6 @@ Direction control {#direction-control}
34933499 Otherwise, return
34943500 <code> 1.0 − <a>simple iteration progress</a> </code> .
34953501
3496- Time transformations {#time-transformations}
3497- --------------------
3498-
3499- It is often desirable to control the rate
3500- at which an [=animation effect=] progresses.
3501- For example, easing the rate of animation
3502- can create a sense of momentum and produce a more natural effect.
3503- The CSS Easing Functions Module [[!CSS-EASING-1]]
3504- defines [=timing functions=] for this purpose.
3505-
3506- [=Animation effects=] have
3507- one [=timing function=] associated with them.
3508- The default [=timing function=]
3509- is the [=linear timing function=] .
3510-
35113502### Calculating the transformed progress ### {#calculating-the-transformed-progress}
35123503
35133504 The <dfn export>transformed progress</dfn> is calculated
@@ -3533,10 +3524,9 @@ Time transformations {#time-transformations}
35333524 passing [=directed progress=] as the <a spec=css-easing>input progress value</a>
35343525 and |before flag| as the <a spec=css-easing>before flag</a> .
35353526
3536- The iteration progress {#the-iteration-progress}
3537- ----------------------
3527+ ### Yielding the iteration progress ### {#the-iteration-progress}
35383528
3539- The <dfn>iteration progress</dfn> of an [=animation effect=]
3529+ The final output <dfn>iteration progress</dfn> of an [=animation effect=]
35403530 is simply its [=transformed progress=] .
35413531
35423532
0 commit comments