Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
[css-animationworklet] Listening events in animation worklet #834
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
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.)
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.