Hi everybody, I'm struggling a lot with the new vars and params...
Now, if I do:
var tw = gsap.to([myMapContents, myMapShadows, myMapExtras, myGridClose, myGridFar], {duration:dur,
cycle:{x:[deltaX, deltaX*.96, deltaX*.8, deltaX*.6, deltaX*.4], y:[deltaY, deltaY*.96, deltaY*.8, deltaY*.6, deltaY*.4] },
ease:Power2.easeOut, onComplete:moveMapComplete, onCompleteParams:[instance], onUpdate:onTweenUpdate, onUpdateParams:["{self}", instance, dur]
} );
like I was was used to with TweenMax, my nice function:
function onTweenUpdate(tw, instance, totaltime){
if(instance.onUpdateTween){
instance.onUpdateTween(tw.time().toFixed(2), totaltime);
}
if(tw.progress() > .8 && !onTweenDrawn){
// if already drawn once, takes no further action
if(!instance.isDrawn){
instance.draw();
}
onTweenDrawn = true;
}
}
Shout at me that:
tw.time()
is not a function...
So, what I have to write to send a reference of the tween somewhere else?
Thank you in advance