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] Retrieve computed data (ie velocity) from AnimationWorklet #976

Open
InventingWithMonster opened this issue Jan 17, 2020 · 0 comments

Comments

@InventingWithMonster
Copy link

@InventingWithMonster InventingWithMonster commented Jan 17, 2020

In the AnimationWorklet spec there's a spring example. The primary use case for a spring animation is to preserve existing velocity in subsequent animations for natural interactions. In Popmotion we often transfer velocity from a tween or touch gesture into spring or inertia animation.

Currently there's no obvious way of retrieving data like velocity from back out of an AnimationWorklet. Taking the timeline as an abstracted progress value rather than a real progress of time, simply knowing how quickly an animation is moving through this would be enough to figure out real value velocities (if we keep each animation to a single value).

It'd be preferable if we could retrieve velocity back on the main thread as that would allow us to do this calculation between animations. It wouldn't need to be every frame, just when an animation is canceled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.