Closed kurtextrem closed 5 years ago
Hi @kurtextrem! There's no API in Shifty to specifically achieve what you're describing, but I think you could get the results you're looking for by doing something like the following:
timeElapsed
value in your tween's stepFunction
.stop()
on your tween when the to
or from
data changesto
and from
data.seek
to the latest timeElapsed
value of the previous tween.resume
the tweenI haven't tried this myself so it may need a bit of adjusting. Other libraries might have a better API for this, though I don't which one would be the best to recommend to you.
Thank you. Will try that out.
E.g. I'm calling the tween function whenever the X/Y coordinates have been updated. This may mean though, that the previous animation doesn't finish fast enough. So the
from
stays the same, but theto
changes. Is this supported here, or would you recommend a different lib?