-
Notifications
You must be signed in to change notification settings - Fork 58
Description
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:
- https://tweenjs.github.io/tween.js/examples/07_dynamic_to.html
- https://www.larsberg.net/#/hexanemone
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