You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add notes to intro and threading section making it clear they are not normative.
Other small changes:
- Remove empty security and privacy sections
- Use should instead of must in one case.
<h2class="no-num no-toc no-ref heading settled" id="subtitle"><spanclass="content">Draft Community Group Report, <timeclass="dt-updated" datetime="2018-08-07">7 August 2018</time></span></h2>
1475
+
<h2class="no-num no-toc no-ref heading settled" id="subtitle"><spanclass="content">Draft Community Group Report, <timeclass="dt-updated" datetime="2018-08-08">8 August 2018</time></span></h2>
This document introduces a new primitive for creating scroll-linked and other high performance
1574
-
procedural animations on the web. For details on the rationale and motivation see <adata-link-type="biblio" href="#biblio-explainer">[explainer]</a>.
1571
+
<em>This section is not normative.</em>
1572
+
<p>This document introduces a new primitive for creating scroll-linked and other high performance
1573
+
procedural animations on the web. For details on the rationale and motivation see <adata-link-type="biblio" href="#biblio-explainer">[explainer]</a>.</p>
1575
1574
<p>The <adata-link-type="dfn" href="#animation-worklet" id="ref-for-animation-worklet">Animation Worklet</a> API provides a method to create scripted animations that control a set
1576
1575
of <adata-link-type="dfn" href="https://w3c.github.io/web-animations/#animation-effect" id="ref-for-animation-effect">animation effects</a>. The API is designed to make it possible for user agents to run such
1577
1576
animations in their own dedicated thread to provide a degree of performance isolation from main
<p><adata-link-type="dfn" href="#animation-worklet" id="ref-for-animation-worklet②">Animation Worklet</a> is designed to be thread-agnostic. Rendering engines may create one or more
1588
1588
parallel worklet execution contexts separate from the main javascript execution context, e.g., on
1589
1589
their own dedicated threads. Rendering engines may then choose to assign Animation Worklet
limit themselves to animating properties which do not require the user agent to consult main thread
1599
1599
will have a much better chance of meeting the strict frame budgets required for smooth playback.</p>
1600
1600
<p>If a Worklet Animation animation is executing in a parallel worklet execution context, the last
1601
-
known state of its animation effects must be periodically synced back to the main javascript
1601
+
known state of its animation effects should be periodically synced back to the main javascript
1602
1602
execution context. The synchronization of <adata-link-type="dfn" href="https://w3c.github.io/web-animations/#effect-value" id="ref-for-effect-value">effect values</a> from the parallel worklet execution
1603
1603
context to the main javascript execution context <em>must</em> occur before <adata-link-type="dfn" href="https://html.spec.whatwg.org/#run-the-animation-frame-callbacks" id="ref-for-run-the-animation-frame-callbacks">running the animation
1604
1604
frame callbacks</a> as part of the document lifecycle. Note that due to the asynchronous nature of
<p><codeclass="idl"><adata-link-type="idl" href="#workletgroupeffect" id="ref-for-workletgroupeffect①">WorkletGroupEffect</a></code> is a type of <adata-link-type="dfn" href="https://w3c.github.io/web-animations/level-2/#group-effect" id="ref-for-group-effect">group effect</a> that allows its <adata-link-type="dfn" href="https://w3c.github.io/web-animations/level-2/#child-effect" id="ref-for-child-effect">child effect’s</a><adata-link-type="dfn" href="https://w3c.github.io/web-animations/#local-time" id="ref-for-local-time④">local times</a> to be mutated individually.</p>
2047
2047
<p>When a <codeclass="idl"><adata-link-type="idl" href="#workletgroupeffect" id="ref-for-workletgroupeffect②">WorkletGroupEffect</a></code> is set as the <adata-link-type="dfn" href="https://w3c.github.io/web-animations/#animation-effect" id="ref-for-animation-effect⑤">animation effect</a> of a <codeclass="idl"><adata-link-type="idl" href="#workletanimation" id="ref-for-workletanimation②">WorkletAnimation</a></code>, the
2048
2048
corresponding <adata-link-type="dfn" href="#animator-instance" id="ref-for-animator-instance②③">animator instance</a> can directly control the <adata-link-type="dfn" href="https://w3c.github.io/web-animations/level-2/#child-effect" id="ref-for-child-effect①">child effects</a>' <adata-link-type="dfn" href="https://w3c.github.io/web-animations/#local-time" id="ref-for-local-time⑤">local
2049
-
times</a>. This allows a single worklet animation to coordinate multiple effects - see <ahref="#example-2">§9.2 Example 2: Twitter header.</a> for an example of such a use-case.</p>
2049
+
times</a>. This allows a single worklet animation to coordinate multiple effects - see <ahref="#example-2">§7.2 Example 2: Twitter header.</a> for an example of such a use-case.</p>
<p>As with other animations, <adata-link-type="dfn" href="#worklet-animation" id="ref-for-worklet-animation①③">worklet animations</a> participate in the <adata-link-type="dfn" href="https://w3c.github.io/web-animations/#effect-stack" id="ref-for-effect-stack">effect stack</a>. A
2081
2081
worklet animation does not have a specific <adata-link-type="dfn" href="https://w3c.github.io/web-animations/#animation-class" id="ref-for-animation-class">animation class</a> which means it has the same
2082
2082
composite order as other Javascript created web animations.</p>
<pclass="issue" id="issue-de770110"><aclass="self-link" href="#issue-de770110"></a> Need to decide what security considerations there are for this spec.</p>
<pclass="issue" id="issue-19f9ed9b"><aclass="self-link" href="#issue-19f9ed9b"></a> Need to decide what privacy considerations there are for this spec.</p>
<divclass="issue"> The above interface exposes a conservative subset
2722
2718
of GroupEffect proposed as part of web-animation-2. Once that is available we
2723
2719
should switch to it. <ahref="https://github.com/w3c/csswg-drafts/issues/2071"><https://github.com/w3c/csswg-drafts/issues/2071></a><ahref="#issue-82bc9872"> ↵ </a></div>
2724
-
<divclass="issue"> Need to decide what security considerations there are for this spec.<ahref="#issue-de770110"> ↵ </a></div>
2725
-
<divclass="issue"> Need to decide what privacy considerations there are for this spec.<ahref="#issue-19f9ed9b"> ↵ </a></div>
2726
2720
<divclass="issue"> This example uses a hypothetical "phase" property on timeline as a way to detect when user
2727
2721
is no longer actively scrolling. This is a reasonable thing to have on scroll timeline. A simple
2728
2722
fallback can emulate this by detecting when timeline time (i.e. scroll offset) has not changed in
0 commit comments