Skip to content

Commit d2e5131

Browse files
Move iterationComposite to web-animations-2
Closes w3c#4300
1 parent 1ce9f47 commit d2e5131

File tree

1 file changed

+14
-98
lines changed

1 file changed

+14
-98
lines changed

web-animations-1/Overview.bs

Lines changed: 14 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ urlPrefix: https://drafts.csswg.org/css-writing-modes-4/; type: dfn; spec: css-w
190190
text: equivalent physical property; url: logical-to-physical
191191
urlPrefix: https://drafts.csswg.org/css-style-attr/; type: dfn; spec: css-style-attr
192192
text: style attribute
193+
urlPrefix: https://drafts.csswg.org/web-animations-2/; type: dfn; spec: web-animations-2
194+
text: iteration composite operation
195+
text: iteration composite operation accumulate
193196
</pre>
194197
<pre class="link-defaults">
195198
spec:dom; type:interface; text:DocumentOrShadowRoot
@@ -3321,10 +3324,9 @@ a <a>target element</a> for which computed property values can be calculated.
33213324
<h4 id="the-effect-value-of-a-keyframe-animation-effect">The effect value of
33223325
a keyframe effect</h4>
33233326

3324-
The <a>effect value</a> of a single property
3325-
referenced by a <a>keyframe effect</a> as one of its
3326-
<a lt="target property">target properties</a>, for a given
3327-
<var>iteration progress</var>, <var>current iteration</var> and
3327+
The <a>effect value</a> of a single property referenced by a <a>keyframe
3328+
effect</a> as one of its <a lt="target property">target properties</a>, for a
3329+
given <var>iteration progress</var>, <var ignore=''>current iteration</var> and
33283330
<var>underlying value</var> is calculated as follows.
33293331

33303332
1. If <var>iteration progress</var> is <a>unresolved</a> abort this
@@ -3422,30 +3424,6 @@ referenced by a <a>keyframe effect</a> as one of its
34223424
corresponding to the <var>target property</var>'s
34233425
<a>animation type</a>.
34243426

3425-
1. If this <a>keyframe effect</a> has an <a>iteration
3426-
composite operation</a> of <a
3427-
lt="iteration composite operation accumulate">accumulate</a>,
3428-
apply the following step <var>current iteration</var> times:
3429-
3430-
* replace the property value of <var>target property</var>
3431-
on <var>keyframe</var> with the result of combining the
3432-
property value on the final keyframe in <var>property-specific
3433-
keyframes</var> (<var>V</var><sub>a</sub>) with the
3434-
property value on <var>keyframe</var>
3435-
(<var>V</var><sub>b</sub>) using the <a
3436-
lt="value accumulation">accumulation procedure</a>
3437-
defined for <var>target property</var>.
3438-
3439-
Note: The order of arguments here is important. In the case where
3440-
the animation type of the target property does not define a
3441-
procedure for accumulation or addition, the default definition
3442-
for these procedures result in <var>V</var><sub>b</sub> being
3443-
returned. When performing iteration composition on propreties
3444-
that do not support accumulation, the result should be the
3445-
initial property value of <var>target property</var> on
3446-
<var>keyframe</var>, hence we we make this
3447-
<var>V</var><sub>b</sub> in the above step.
3448-
34493427
1. If there is only one keyframe in <var>interval endpoints</var>
34503428
return the property value of <var>target property</var> on that
34513429
keyframe.
@@ -3733,29 +3711,6 @@ property</a> is applied using the following process.
37333711
effect at the top of the <a>effect stack</a> established for the target
37343712
property.
37353713

3736-
<h3 id="effect-accumulation-section">Effect accumulation</h3>
3737-
3738-
Similar to the compositing performed between <a>effect values</a>
3739-
(see [[#effect-composition]]), the <dfn>iteration composite operation</dfn>
3740-
determines how values are combined between successive iterations of
3741-
the same <a>keyframe effect</a>.
3742-
3743-
This specification defines two <a>iteration composite operations</a>
3744-
as follows:
3745-
3746-
: <dfn lt="iteration composite operation replace">replace</dfn>
3747-
:: Each successive iteration is calculated independently of previous
3748-
iterations.
3749-
: <dfn lt="iteration composite operation accumulate">accumulate
3750-
:: Successive iterations of the animation are <a
3751-
lt="value accumulation">accumulated</a> with the
3752-
final value of the previous iteration.
3753-
3754-
The application of the <a>iteration composite operation</a> is
3755-
incorporated in the calculation of the <a>effect value</a> in <a
3756-
href="#the-effect-value-of-a-keyframe-animation-effect"
3757-
section></a>.
3758-
37593714
<h3 id="replacing-animations">Replacing animations</h3>
37603715

37613716
<div class="informative-bg"><em>This section is non-normative</em>
@@ -4689,7 +4644,6 @@ dictionary ComputedEffectTiming : EffectTiming {
46894644
Constructor(KeyframeEffect source)]
46904645
interface KeyframeEffect : AnimationEffect {
46914646
attribute (Element or CSSPseudoElement)? target;
4692-
attribute IterationCompositeOperation iterationComposite;
46934647
attribute CompositeOperation composite;
46944648
sequence&lt;object&gt; getKeyframes();
46954649
void setKeyframes(object? keyframes);
@@ -4724,16 +4678,15 @@ interface KeyframeEffect : AnimationEffect {
47244678
If that procedure causes an exception to be thrown, propagate the
47254679
exception and abort this procedure.
47264680

4727-
1. If <var>options</var> is a {{KeyframeEffectOptions}} object,
4728-
assign the {{KeyframeEffect/iterationComposite}}, and
4729-
{{KeyframeEffect/composite}}, properties of <var>effect</var> to the
4730-
corresponding value from <var>options</var>.
4681+
1. If <var>options</var> is a {{KeyframeEffectOptions}} object, assign
4682+
the {{KeyframeEffect/composite}} property of <var>effect</var> to
4683+
the corresponding value from <var>options</var>.
47314684

4732-
When assigning these properties, the error-handling defined for the
4733-
corresponding setters on the {{KeyframeEffect}} interface is applied.
4734-
If any of those setters require an exception to be thrown
4735-
for the values specified by <var>options</var>, this procedure must
4736-
<a>throw</a> the same exception and abort all further steps.
4685+
When assigning this property, the error-handling defined for the
4686+
corresponding setter on the {{KeyframeEffect}} interface is applied.
4687+
If the setter requires an exception to be thrown for the value
4688+
specified by <var>options</var>, this procedure must <a>throw</a>
4689+
the same exception and abort all further steps.
47374690

47384691
1. Initialize the set of <a>keyframes</a> by performing the procedure
47394692
defined for {{KeyframeEffect/setKeyframes()}} passing
@@ -4777,7 +4730,6 @@ interface KeyframeEffect : AnimationEffect {
47774730

47784731
* <a>target element</a>,
47794732
* <a>keyframes</a>,
4780-
* <a>iteration composite operation</a>,
47814733
* <a>composite operation</a>, and
47824734
* all specified timing properties:
47834735
* [=start delay=],
@@ -4812,14 +4764,6 @@ interface KeyframeEffect : AnimationEffect {
48124764
a specific element such as an animation that produces a sound
48134765
using an audio API.
48144766

4815-
: <dfn attribute for=KeyframeEffect>iterationComposite</dfn>
4816-
:: The <a>iteration composite operation</a> property of this
4817-
<a>keyframe effect</a> as specified by one of the
4818-
<a>IterationCompositeOperation</a> enumeration values.
4819-
4820-
On setting, sets the <a>iteration composite operation</a> property of this
4821-
<a>animation effect</a> to the provided value.
4822-
48234767
: <dfn attribute for=KeyframeEffect>composite</dfn>
48244768
:: The <a>composite operation</a> used to composite this
48254769
<a>keyframe effect</a> with the <a>effect stack</a>, as
@@ -5603,17 +5547,12 @@ options)}} constructor by providing a {{KeyframeEffectOptions}} object.
56035547

56045548
<pre class='idl'>
56055549
dictionary KeyframeEffectOptions : EffectTiming {
5606-
IterationCompositeOperation iterationComposite = "replace";
56075550
CompositeOperation composite = "replace";
56085551
};
56095552
</pre>
56105553

56115554
<div class="members">
56125555

5613-
: <dfn dict-member for=KeyframeEffectOptions>iterationComposite</dfn>
5614-
:: The <a>iteration composite operation</a> used to define the way
5615-
animation values build from iteration to iteration.
5616-
56175556
: <dfn dict-member for=KeyframeEffectOptions>composite</dfn>
56185557
:: The <a>composite operation</a> used to composite this
56195558
animation with the <a>effect stack</a>, as specified by one
@@ -5624,29 +5563,6 @@ dictionary KeyframeEffectOptions : EffectTiming {
56245563

56255564
</div>
56265565

5627-
<h3 id="the-iterationcompositeoperation-enumeration">The <code>IterationCompositeOperation</code> enumeration</h3>
5628-
5629-
The possible values of an <a>animation effect</a>'s
5630-
<a>iteration composite operation</a> are represented by the
5631-
<dfn>IterationCompositeOperation</dfn> enumeration.
5632-
5633-
<pre class='idl'>
5634-
enum IterationCompositeOperation { "replace", "accumulate" };
5635-
</pre>
5636-
5637-
: <code>replace</code>
5638-
:: Corresponds to the <a
5639-
lt="iteration composite operation replace">replace</a>
5640-
<a>iteration composite operation</a> value such that the
5641-
<a>effect value</a> produced is independent of the
5642-
<a>current iteration</a>.
5643-
: <code>accumulate</code>
5644-
:: Corresponds to the <a
5645-
lt="iteration composite operation accumulate">accumulate</a>
5646-
iteration composite operation value such that
5647-
subsequent iterations of an <a>animation effect</a> build
5648-
on the final value of the previous iteration.
5649-
56505566
<h3 id="the-compositeoperation-enumeration">The <code>CompositeOperation</code> and <code>CompositeOperationOrAuto</code> enumerations</h3>
56515567

56525568
The possible values of an <a>keyframe effect</a>'s

0 commit comments

Comments
 (0)