Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-animationworklet] Listening events in animation worklet #834

RDMStreet opened this Issue Nov 22, 2018 · 1 comment


None yet
2 participants
Copy link

RDMStreet commented Nov 22, 2018

Can I listen events in animation worklet or transfer data from main thread to running animation worklet?


This comment has been minimized.

Copy link

majido commented Mar 7, 2019

On transferring data from main thread

I think this the need such a mechanism to make animation worklet useful. Since many useful effects running inside animation worklet may need to know about specific values from main thread, e.g., size of window or bounding client rects of various objects.

Since we already allow data to be sent when worklet animation (via options) when it is constructed. The logical extension is to allow options to be updated as well. This is a simple and reasonable extension. I will update the spec to allow this.

See more details on specific proposed change here

On listening to events in animation worklet

Again I think there is a lot of merit to this idea. In fact, one of our goals is to allow worklet animation inside animation worklet context to be able to react to user input (touch, gesture, etc.)

We have been trying to come up with the right abstraction and API to allow this (see: 1, 2, 3), and our recent idea which I am very hopeful about is captured here.

I think once we have the solution for sending data from main thread to worklet, one can build a simple event forwarding on top of it. But we need a better solution to have low-latency event forwarding which the other ideas are trying to address.

@majido majido referenced this issue Mar 8, 2019


CSS Animation Worklet API #349

3 of 5 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.