JohnPaulDesign
12/1/2016 - 11:58 AM

Stagger animation with scrollmagic trigger

Stagger animation with scrollmagic trigger

var element = $(".element");
TweenMax.set(element, {starting position});

var tween = new TimelineMax()
    .add(TweenMax.staggerTo(element, seconds, {ending position}, staggerSeconds))

var scene = new ScrollMagic.Scene({triggerElement: ".trigger", triggerHook: "onEnter", duration: 1, tweenChanges: true, reverse: false, offset: 0 })
    .setTween(tween)
    .addTo(controller);