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
* Sophisticated effects which involves complex coordination across multiple animations.
52
53
53
-
These usecases are enabled by the current proposed but [additional usecases](principles.md#animation-worklet-vision) are going to be addressed by extension of the API.
54
+
55
+
56
+
These usecases are enabled by the current proposed but [additional usecases](principles.md
57
+
#animation-worklet-vision) including input-driven animations are going to be addressed by extension
58
+
of the API.
54
59
55
60
***Note***: Demos work best in the latest Chrome Canary with the experimental
56
61
web platform features enabled (`--enable-experimental-web-platform-features`
@@ -78,14 +83,14 @@ Note that worklet animations expose same API surface as other web animations and
78
83
created, played, paused, inspected, and generally controlled from main document scope. Here is how
79
84
various methods roughly translate:
80
85
81
-
- cancel(): cancels the animation and the corresponding animator instance is removed.
82
-
- play(): starts the animation and the corresponding animator instance may get its `animate` function
83
-
called periodically as a result of changes in its timelines.
86
+
-`cancel()`: cancels the animation and the corresponding animator instance is removed.
87
+
-`play()`: starts the animation and the corresponding animator instance gets constructed and
88
+
may get its `animate` function called periodically as a result of changes in its timelines.
84
89
- pause(): pauses the animation and the corresponding animator instance no longer receives
85
90
`animate` calls.
86
-
- finish(): invokes `finish` on the corresponding animator instance.
87
-
- reverse() or mutating playbackRate: invokes `playbackRateChanged` on the corresponding
88
-
animator instance.
91
+
- finish(), reverse() or mutating playbackRate: these affect the currentTime which is seens by
92
+
the animator instance. (We are considering possiblity of having a `onPlaybackRateChanged`
93
+
callback)
89
94
90
95
## ScrollTimeline
91
96
[ScrollTimeline](https://wicg.github.io/scroll-animations/#scrolltimeline) is a concept introduced in
@@ -106,56 +111,71 @@ flexible scheduling model by making it possible to to set children effect's loca
106
111
other words we allow arbitrary start time for child effects. This is something that needs to be
107
112
added to level 2 spec.
108
113
109
-
## Multiple Timelines
114
+
## ~~Multiple Timelines~~
110
115
Unlike typical animations, worklet animations can be attached to multiple timelines. This is
111
116
necessary to implement key usecases where the effect needs to smoothly animate across different
112
117
timelines (e.g., scroll and wall clock).
113
118
114
-
### Primary Timeline
115
-
The first timeline is considered the *primary timeline*. The only purpose of the primary timeline is
116
-
to make integration with existing web animation machinery easier, in particular the primary timeline
117
-
time will be used anywhere the web animation API needs to expose a time value, for example in
118
-
[event timeline time](https://w3c.github.io/web-animations/level-2/#event-timeline-time), or
119
-
[event current time](https://w3c.github.io/web-animations/level-2/#event-current-time).
119
+
**NOTE**: We have decided to drop this piece in favor of alternative ideas. Most recent
0 commit comments