When I try to tween a variable down to zero on mouseleave, nothing seems to happen when the mouse leaves the container. I've experimented with different approaches but can't figure out what I'm doing wrong.
Here's the code snippet in question:
function ondocumentMouseLeave ( event ){
new TWEEN.Tween( mouseY )
.to ( 0 , 500 )
.easing( TWEEN.Easing.Linear.None)
.start();
new TWEEN.Tween( mouseX )
.to ( 0 , 500)
.easing( TWEEN.Easing.Linear.None)
.start();
}
If you'd like to take a closer look, here's the jsfiddle link:
https://jsfiddle.net/cxp8rex2/16/
Sorry if this seems like a basic issue, I'm still getting the hang of things.