tweenjs/es6-tween

Can't stop tween when Infinit repeat.

lizistorm opened this issue · 5 comments

Can't stop tween when Infinit repeat. It just ignore when _isFinite is false in Tween.stop/Lite.stop.

But in origin tween.js version there is no _isFinite check in stop function.

Hi. Thanks for issue. I know this bug, because of createUi i did this trick. But i will introduce major update in 2-3days or max next week. Until it please wait. I am very want fix, but because of my work i have not time

Or you can modify code for yourself. If not know TypeScript, after installation with npm, run 'tsc' on directory and you should see src compiled foldrr

OK. Thanks!

Just remove _isFinite check in stop().

change
if (!_isPlaying || !_isFinite) { return this; }
to
if (!_isPlaying) { return this; }

And maybe _r in stop() should be _reversed. Or it will not go back to start value when reversed.

change
let atEnd = (_r + 1) % 2 === 1;
to
let atEnd = _reversed % 2 === 1;

I already fix that in local machine. Just not find time to upload. Thanks for fix again

Your issue should resolve 4.0.1