I'm trying to get a staggerFrom animation to occur on a scrollmagic event with the following code however, the stagger always seems to happen instantly on page load rather than waiting for the scroll magic event to fire.
var tween = TweenMax.staggerFrom(targetDivs, 2, { opacity: 0 }, 0.5),
scene = new ScrollMagic.Scene({
triggerElement: element,
reverse: false,
});
scene.setTween(tween)
scene.addTo(this.controller)
scene.addIndicators({ name: "staggering" });
this.scenes.push(scene);
Using other simple tweens like this work as expected without any issues:
var tween = TweenMax.from(element, .75, { opacity: 0, x: -40 })
Is there anything specific about 'staggerFrom' which would stop this from working?