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

Feature-suggestion: a dynamic to/target would be a nice addition to the API #43

Open
MacSlow opened this issue Apr 16, 2024 · 0 comments

Comments

@MacSlow
Copy link

MacSlow commented Apr 16, 2024

Greetings everybody!

Just today I started playing around with tweeny to get a feel for its API. While doing so I was wondering how I can alter a currently running tween (or rather the current to-value) to have it 'chase' a target-value... kind of a 'moving to'-value.

So far I could not achieve such a behavior with the existing API. Looking through the code I could also not see any existing infrastructure to update an already supplied to-value.

These examples here - using Tween.js - are a good demonstrations of the concept:

As long as a tween is still in progress interpolating from 'from' to 'to' an additional method (e.g. .updateTo(newValue)) should be provided to update the current 'to'-value, thus affecting the interpolation-steps aiming for the new value. With the template-magic of tweeny this would then also apply to non-scalar and heterogeneous values.

Best regards...

MacSlow

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

No branches or pull requests

1 participant