jquery - Superscrollorama, TweenMax Make an Animation play and after that resume scrolling -
is there way let user scroll point, element fades in, after animation (x2) played (without user input) , after scrolling triggers further animations, can triggered if animation(x2) has played through.
var controller = $.superscrollorama({ triggeratcenter: false }); // set duration, in pixels scrolled, pinned element var pindur = 2800; // create animation timeline pinned element var pinanimations = new timelinelite(); pinanimations .append([ tweenmax.to($('#mouse_walk'), 5, {css:{opacity: 1}, oncomplete: function(){ $( "#mouse_walk, #mouse_walk img" ).stop().animate( {height: '977px', width: '1080px', left: '49.5%', top:'370px'}, 200, function(){ $( "#mouse_walk, #mouse_walk img" ).stop().animate( {height: '944px', width: '1044px', left: '50%', top:'380px'}, 200, function(){ $( "#mouse_walk, #mouse_walk img" ).stop().animate( {height: '995px', width: '1100px', left: '49.3%', top:'360px'}, 200, function(){ $( "#mouse_walk, #mouse_walk img" ).stop().animate( {height: '944px', width: '1044px', left: '50%', top:'380px'}, 200, function(){ settimeout(function() { $( "#mouse_walk, #mouse_walk img" ).stop().animate( {height: '977px', width: '1080px', left: '49.5%', top:'370px'}, 200, function(){ $( "#mouse_walk, #mouse_walk img" ).stop().animate( {height: '944px', width: '1044px', left: '50%', top:'380px'}, 200, function(){ $( "#mouse_walk, #mouse_walk img" ).stop().animate( {height: '995px', width: '1100px', left: '49.3%', top:'360px'}, 200, function(){ $( "#mouse_walk, #mouse_walk img" ).stop().animate( {height: '944px', width: '1044px', left: '50%', top:'380px'}, 200, function(){ }) }) }) }) }, 800); }) }) }) }); } } ) ]) .append([ tweenmax.to( $('#mouse_walk_hell'), 5, {css:{opacity: '1'}}) ])
this seems overly complicated.
my thought process on have pin initial animation.
oncomplete of animation directly add tween want happen?
you can nest timelinelight inside of oncomplete method can sequence animations without having huge nested group of jquery animation.
i highly recommend not mix greensock , jquery animations together, have caused nightmare me.
Comments
Post a Comment