tween.js
tween.js copied to clipboard
When a tween is paused, it's also playing
Considering the following code
//a new tween running for 15segs
var tween = new TWEEN.Tween({width: 0})
.to({width: 100}, 15000)
.start();
function pause_or_resume(){
if(tween.isPlaying()){
tween.pause();
} else {
tween.resume();
}
}
Calling pause_or_resume
the first time correctly pauses the tween. Calling the same function a second time never resumes the tween because the pause method never sets _isPlaying = false
so the function isPlaying()
returns true
anyway