javascript - ScrollMagic Tween: play animation only once going forward -
i want know how have animation play once going forward when scroll down , when scroll there no animation.
var controller = new scrollmagic.controller(); var tween_1 = tweenmax.to('#obj_1', 0.5, { left: '0%', delay: .1 }); var containerscene = new scrollmagic.scene({ triggerelement: '#scene_1', offset: -100 }) .settween(tween_1) .addindicators() .addto(controller);
it's pretty ease actually, set reverse:false
option, so:
var controller = new scrollmagic.controller(); var tween_1 = tweenmax.to('#obj_1', 0.5, { left: '0%', delay: .1 }); var containerscene = new scrollmagic.scene({ triggerelement: '#scene_1', offset: -100, reverse:false }) .settween(tween_1) .addindicators() .addto(controller);
Comments
Post a Comment