I will master the onRepeat one day!
I'm trying to make ingredients fall and then vanish when they do before they repeat again (so they aren't all just chilling at the bottom of my screen)
function erase(){
TweenLite.set(this, {
scale: 0
});
}
var food = ['.meat', '.pepper', '.nori', '.toppings']
for(var i = 0; i < food.length; i++ ){
ing.to(food, 1, {
rotation: 360,
x: '+=30',
y: yTo,
scale: 1,
repeat: -1,
repeatDelay: time * food.length,
ease: Power1.easeIn,
onRepeat: erase
}, time * i ,'start');
}
Is it that the onRepeat doesn't fire until after the repeatDelay? Would it be smarter to just use a staggerTo?