the Chromium logo

The Chromium Projects

Animation Worklet

Animation Worklet is a new primitive that provides extensibility for web animations and enables high performance scripted animations that can run on dedicated thread. The feature is developed as part of the CSS Houdini task force.

The Animation Worklet API provides a method to create scripted animations that control a set of animation effects. These animations are executed inside an isolated execution environment, worklet which makes it possible for browser to run such animations in their own dedicated thread to provide a degree of performance isolation from main thread. Worklet animations may be created and controlled via Web Animations API. Animation Worklet combined with other new features such as ScrollTimeline, Input in Worklets, can allow many currently interactive main-thread rAF-based animations to move off main thread which improve smoothness.

[Specification](https://drafts.css-houdini.org/css-animationworklet/)

[Explainer](https://github.com/w3c/css-houdini-drafts/blob/master/css-animationworklet/README.md)

[Design Principles and
Goals](https://github.com/w3c/css-houdini-drafts/blob/master/css-animationworklet/principles.md)

Tests:
<https://github.com/web-platform-tests/wpt/tree/master/animation-worklet>

Example codes [1](https://googlechromelabs.github.io/houdini-samples/),
[2](https://aw-playground.glitch.me/),
[3](https://houdini.glitch.me/animation)

[Blink Design
Document](https://docs.google.com/document/d/1MdpvGtnK_A2kTzLeTd07NUevMON2WBRn5wirxWEFd2w/edit?usp=sharing)

Current Status

Milestone Status Key features
Animation Worklet Prototype Done Scripted custom animation, single effect, only fast properties, off main-thread (using compositor thread).
Animation Worklet Origin Trial In progress (signup) Scroll input (via ScrollTimeline), basic web-animation controls (play/cancel), move to dedicated thread, optimized performance.
Animation Worklet V1 - MVP Scheduled for M75 Animate all properties (slow path ones runs in sync with main thread), sophisticated scheduling so we do not block compositor thread, improved scroll timeline integration.
Animation Worklet V2 TBD Pointer input via Events, multi-input animation, support GroupEffects, improved integration with Paint Worklet.