-
Notifications
You must be signed in to change notification settings - Fork 71
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
Can the damper function be added? #188
Comments
I'm not sure what functionality you need. What API do you envision for this specifically? |
The damper is essentially equal to a Tweener with an infinite duration and a constantly changing target value.
When I tried to merge the damper and the tweener, the problem I encountered was that the tweener doesn't need to care about specific current and target values, it is normalized from a fixed starting value to an ending value. But the damper is not. The damper needs to obtain specific current and target values for each frame, because the absolute difference between the current and target values determines the interpolation speed, while the target value may be constantly changing. I think changing the Tweener to obtain specific current and target values may unify the two. |
Can the damper function be added? For handling animations that often need to be interrupted, damper is a better choice than Tween.
Here are some introductions I found
https://theorangeduck.com/page/fitting-code-driven-displacement
https://theorangeduck.com/page/code-vs-data-driven-displacement
I have tried to implement a version before, but I couldn't achieve a good integration between Damp and the existing Tween Perhaps you can do better
https://github.com/Rotanticu/LitDamper
The text was updated successfully, but these errors were encountered: