AnimationWorklet should have access to the full AnimationEffect functionality in the worklet context but it currently has only a very limited subset (i.e., setting local time).
Here is the currently exposed interface:
interface EffectProxy {
attribute unrestricted double? localTime;
};
The interface that we eventually want is KeyframeEffect [2]. One tricky part it to figure out the best way to plumb keyframe values to the worklet for the composited animations.
As a first step we can probably start by exposing AnimationEffect interface which only include timing related properties which are available both on blink and cc.
interface AnimationEffect {
EffectTiming getTiming();
ComputedEffectTiming getComputedTiming();
[RaisesException] void updateTiming(optional OptionalEffectTiming timing);
[exposed=AnimationWorklet]
attribute unrestricted double? localTime;
};
[1] https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/animationworklet/effect_proxy.idl
[2] https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/animation/keyframe_effect.idl
Comment 1 by sunyunjia@chromium.org
, Dec 17