Skip to content

Commit 339c8a0

Browse files
Kevin Ellisbirtles
authored andcommitted
Address feedback
1 parent dac2207 commit 339c8a0

1 file changed

Lines changed: 96 additions & 50 deletions

File tree

web-animations-2/Overview.bs

Lines changed: 96 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -153,39 +153,53 @@ Add:
153153
> used to calculate the [=intrinsic iteration duration=] for the target effect
154154
> of an animation that is associated with the timeline when the effect's
155155
> [=iteration duration=] is 'auto'. The value is computed such that the effect
156-
> fills the available time. For a monotonic timeline, there is no upper bound
157-
> on current time, and [=timeline duration=] is unresolved. For a progress based
158-
> timeline, the [=timeline duration=] is 100%.
156+
> fills the available time. For a monotonic timeline, there is no upper bound
157+
> on current time, and [=timeline duration=] is unresolved. For a non-monotonic
158+
> (i.e. scroll) timeline, the duration has a fixed upper bound. In this
159+
> case, the timeline is a <dfn lt="progress-based timeline">progress-based
160+
> timeline</dfn>, and its [=timeline duration=] is 100%.
159161

160162
<h3 id="animations">Animations</h3>
161163

162164
Add:
163165

164-
> Animation effects associated with a progress-based timeline require their
166+
> Animation effects associated with a [=progress-based timeline=] require their
165167
> timing properties to be converted to proportions. The procedure for converting
166-
> a <dfn lt="time-based animation to a proportional animation"></dnf> is as
168+
> a <dfn lt="time-based animation to a proportional animation"></dfn> is as
167169
> follows:
168170
>
169171
> 1. If the [=iteration duration=] is auto, then perform the following steps.
172+
> * Set [=start delay=] and [=end delay=] to 0, as it is not
173+
> possible to mix time and proportions.
174+
> <div class='note'>
175+
> Future versions may allow these properties to be assigned
176+
> percentages, at which point the delays are only to be ignored if
177+
> their values are expressed as times and not as percentages.
178+
> </div>
179+
> Otherwise:
180+
> 1. Let <var>total time</var> be equal to |end time|
181+
> 1. Set [=start delay=] to be the result of evaluating
182+
> <code>|specified start delay| / |total time| *
183+
> |timeline duration|</code>.
184+
> 1. Set [=iteration duration=] to be the result of evaluating
185+
> <code>|specified iteration duration| / |total time| *
186+
> |timeline duration|</code>.
187+
> 1. Set [=end delay=] to be the result of evaluating
188+
> <code>|specified end delay| / |total time| *
189+
> |timeline duration|</code>.
170190
>
171-
> 1. Compute [=start delay=] and [=end delay=] to 0, as it is not possible
172-
> to mix time and proportions. Future versions may allow these properties
173-
> to be assigned percentages.
191+
> The procedure to <dfn>normalize specified timing</dfn> is as follows:
174192
>
175-
> 1. Otherwise,
176-
>
177-
> 1. Let <var>total time</var> be equal to the result of evaluating
178-
> <code>|start delay| + |iteration count| * |iteration duration| +
179-
> |end delay|</code>.
180-
>
181-
> 1. Compute [=start delay=] to be the result of evaluating
182-
> <code>|start delay| / |total time| * |timeline duration|</code>.
183-
>
184-
> 1. Compute [=iteration duration=] to be the result of evaluating
185-
> <code>|iteration duration| / |total time| * |timeline duration|</code>.
186-
>
187-
> 1. Compute [=end delay=] to be the result of evaluating
188-
> <code>|end delay| / |total time| * |timeline duration|</code>.
193+
> If [=timeline duration=] is resolved:
194+
> * Follow the procedure to convert a [=time-based animation to a
195+
> proportional animation=]
196+
> Otherwise:
197+
> 1. Set [=start delay=] = |specified start delay|
198+
> 1. Set [=end delay=] = |specified end delay|
199+
> 1. If |iteration duration| is auto:
200+
> * Set [=iteration duration=] = |intrinsic iteration duration|
201+
> Otherwise:
202+
> * Set [=iteration duration=] = |specified iteration duration|
189203

190204
<h4 id="setting-the-timeline">Setting the timeline of an animation</h4>
191205

@@ -861,9 +875,6 @@ If the <a>inherited time</a> is <a>unresolved</a> then the local time
861875
is also <a>unresolved</a>.
862876

863877

864-
865-
866-
867878
<h4 id="animation-effect-phases-and-states">Animation effect phases and
868879
states</h4>
869880

@@ -1557,7 +1568,7 @@ number of <a>child effects</a> as follows.
15571568
after calculating the <a>end time</a> of each <a>child
15581569
effect</a> in the group. The <a>end time</a> may be
15591570
expressed as a time or a percentage (in the case of a
1560-
progress based animation). In the event of mixed time and
1571+
[=progress-based animation=]). In the event of mixed time and
15611572
percentage <a>end time</a>s, the largest time based value
15621573
equates to 100% for the purpose of time scaling.
15631574
2. The <a>intrinsic iteration duration</a> is the result of
@@ -2113,40 +2124,34 @@ partial dictionary OptionalEffectTiming {
21132124
: <dfn>delay</dfn>
21142125
:: Update the description as:
21152126

2116-
> The <a>start delay</a> which represents the number of milliseconds from an
2117-
> <a>animation effect</a>'s <a lt="animation effect start time">start
2118-
> time</a> to the start of the <a>active interval</a>.
2119-
> If the <a lt="timeline duration">duration</dfn> of the Animation's
2120-
> <a>timeline</a> is a percentage, the start delay will be treated as the
2121-
> result of applying the procedure to convert a
2122-
> [=time-based animation to a proportional animation=].
2127+
> The <dfn>specified start delay</dfn> which represents the number of
2128+
> milliseconds from an <a>animation effect</a>'s
2129+
> <a lt="animation effect start time">start time</a> to the start of the
2130+
> <a>active interval</a>.
2131+
> The |specified start delay| is converted to a <a>start delay</a> following
2132+
> the [=normalize specified timing=] procedure.
21232133

21242134
: <dfn>endDelay</dfn>
21252135
:: Update the description as:
21262136

2127-
> The <a>end delay</a> which represents the number of milliseconds
2137+
> The <dfn>specified end delay</dfn> which represents the number of milliseconds
21282138
> from the end of an <a>animation effect</a>'s <a>active interval</a>
21292139
> until the <a lt='animation effect start time'>start time</a> of any
2130-
> <a>animation effect</a> that may
2131-
> follow, for example, in a <a>sequence effect</a>.
2132-
> If the <a lt="timeline duration">duration</dfn> of the Animation's
2133-
> <a>timeline</a> is a percentage, the end delay will be treated as the
2134-
> result of applying the procedure to convert a
2135-
> [=time-based animation to a proportional animation=].
2136-
2137-
</div>
2140+
> <a>animation effect</a> that may follow, for example, in a <a>sequence
2141+
> effect</a>. The |specified end delay| is converted to an <a>end delay</a>
2142+
> following the [=normalize specified timing=] procedure.
21382143

21392144
: <dfn>duration</dfn>
2140-
:: Add:
2141-
2142-
> If the <a lt="timeline duration">duration</dfn> of the Animation's
2143-
> <a>timeline</a> is a percentage, a non <code>auto</code> duration will
2144-
> be treated as the result of applying the procedure to convert a
2145-
> [=time-based animation to a proportional animation=].
2145+
:: Update the description as:
21462146

2147-
> The string value <code>auto</code> is used to indicate that the
2147+
> The <dfn>specified iteration duration</dfn> which is a real number greater
2148+
> than or equal to zero (including positive infinity) representing the
2149+
> time taken to complete a single iteration of the <a>animation
2150+
> effect</a>, or the string value <code>auto</code> to indicate that the
21482151
> <a>iteration duration</a> reflects the animation effect's
2149-
> <a>intrinsic iteration duration</a>.
2152+
> <a>intrinsic iteration duration</a>. The |specified iteration duration|
2153+
> is converted to an <a>iteration duration</a> following the
2154+
> [=normalize specified timing=] procedure.
21502155

21512156
: <dfn dict-member for=EffectTiming>playbackRate</dfn>
21522157
:: The <a>animation effect</a>'s <a
@@ -2156,6 +2161,47 @@ partial dictionary OptionalEffectTiming {
21562161

21572162
</div>
21582163

2164+
<h3 id="updating-animationeffect-timing">Updating the timing of an
2165+
AnimationEffect</h3>
2166+
2167+
Replace:
2168+
2169+
> Assign each member <a>present</a> in |input| to the corresponding timing
2170+
> property of |effect| as follows:
2171+
>
2172+
> * {{EffectTiming/delay}} &rarr; [=start delay=]
2173+
> * {{EffectTiming/endDelay}} &rarr; [=end delay=]
2174+
> * {{EffectTiming/fill}} &rarr; [=fill mode=]
2175+
> * {{EffectTiming/iterationStart}} &rarr; [=iteration start=]
2176+
> * {{EffectTiming/iterations}} &rarr; [=iteration count=]
2177+
> * {{EffectTiming/duration}} &rarr; [=iteration duration=]
2178+
> * {{EffectTiming/direction}} &rarr; [=playback direction=]
2179+
> * {{EffectTiming/easing}} &rarr; [=timing function=]
2180+
2181+
with:
2182+
2183+
> Assign each member <a>present</a> in |input| to the corresponding timing
2184+
> property of |effect| as follows:
2185+
>
2186+
> * {{EffectTiming/delay}} &rarr; [=specified start delay=]
2187+
> * {{EffectTiming/endDelay}} &rarr; [=specified end delay=]
2188+
> * {{EffectTiming/fill}} &rarr; [=fill mode=]
2189+
> * {{EffectTiming/iterationStart}} &rarr; [=iteration start=]
2190+
> * {{EffectTiming/iterations}} &rarr; [=iteration count=]
2191+
> * {{EffectTiming/duration}} &rarr; [=specified iteration duration=]
2192+
> * {{EffectTiming/direction}} &rarr; [=playback direction=]
2193+
> * {{EffectTiming/easing}} &rarr; [=timing function=]
2194+
2195+
Add:
2196+
2197+
> Follow the procedure to [=normalize specified timing=].
2198+
>
2199+
> <p class="note">
2200+
> Timing properties may also be updated due to a style change. Any change to
2201+
> a CSS animation property that affects timing requres rerunning the
2202+
> procedure to [=normalize specified timing=].
2203+
> </p>
2204+
21592205
<h3 id="the-computedeffecttiming-dictionary">The
21602206
<code>ComputedEffectTiming</code> dictionary</h3>
21612207

0 commit comments

Comments
 (0)