Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
sirhclluk

lagSmoothing with TimelineLite

Recommended Posts

I found how to add lagSmoothing to tweenlite and max, but I have not been able to find or figure out how to use it with TimelineLite.

Where would I add it in this for example?

 

var tl = new TimelineLite();
    tl.to(energyImage, 0, {opacity:0});
    tl.from(shape, 5, {rotationY:"-=3000", ease:Sine.easeIn});
    tl.from(shape, 1, {autoAlpha:0}, "-=4");

 

 

 

 

Thanks

Link to post
Share on other sites

Hi,

 

 

lagSmoothing() effects the core timing mechanism in GSAP. Doing it via TweenLite or TweenMax has the same effect. Both ways effect the timing of the entire engine, so you don't need to do anything specific for TimelineLite or TimelineMax... they will honor the lagSmoothing() settings that you set via TweenLite (or max).

  • Like 3
Link to post
Share on other sites

Hi,

 

lagSmoothing() is a TweenLite/Max core method and a global setter. That means that you set the value  through any of those constructors and it becomes a default for any instance you run, like adjusting the tick event frequency. Is not an instance specific property like lazy render or force3D, that can be applied in some individual instances as you desire.

 

Take a good look at this blog post:

 

http://greensock.com/gsap-1-12-0

 

PS: What Carl just said ;)

  • Like 3
Link to post
Share on other sites

Thanks for the replies from both of you. So are you saying it's built in and I don't need to add code for it to work?

 

Thanks

Link to post
Share on other sites

You only need to add lagSmoothing code if you want to change the default settings. Which are explained in the article and video Rodrigo linked too.

 

Using TweenLite.lagSmoothing() will affect the entire engine.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×