Joao Doria
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by Joao Doria
-
-
Thanks Carl! I will try this, it's looking very clear. Thank you for the quick response as well.
-
Hello,
I am animating three divs according to three variables I request from a server:
this.onload = function(){ var tldot = new TimelineMax({delay:0, repeat:-1}); tldot.add( TweenMax.to(".bgdot", <%= 1/windSpeed1 * 100 %>, {backgroundPosition:"100px center", ease:Linear.easeNone}) ); var tldash = new TimelineMax({delay:0, repeat:-1}); tldash.add( TweenMax.to(".bgwave", <%= 1/windSpeed2 * 100 %>, {backgroundPosition:"100px center", ease:Linear.easeNone}) ); var tlwave = new TimelineMax({delay:0, repeat:-1}); tlwave.add( TweenMax.to(".bgdash", <%= 1/windSpeed3 * 100 %>, {backgroundPosition:"100px center", ease:Linear.easeNone}) ); };
I am trying to make periodic server requests that will alter the speed of the animation according to the new values passed by the variables.
I tried to do this manually by doing using tweenmax:
window.setTimeout(function() { TweenMax.to(".bgdot", <%= windSpeed1 %>, {backgroundPosition:"-100px center", ease:Linear.easeNone, repeat:-1}); }, 5000);
But since this affects an ongoing animation it makes a bump.
Is there any way I can alter the speed and keep the flow of the loop? If so, how do I add it to the current TimelineMax I created?
Thanks,
João
keyframe insertion / seamless animation
in GSAP
Posted
Hi Carl,
now I have another doubt. Is it possible to change a css property while the tween is being animated? I managed to change the timescale and other controls but I might be writing something wrong when it comes to changing the css? (basically I would like this object to move when I click the button). Would that be the case for using timeline instead?