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

Popular posts from this blog

php - Admin SDK -- get information about the group -

dns - How To Use Custom Nameserver On Free Cloudflare? -

Python Error - TypeError: input expected at most 1 arguments, got 3 -