Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
jesper.landberg

Did 2.1, immediateRender default behaviour changed?

Recommended Posts

Hi,

 

I updated my gsap version, no other changes done. Now my transitions doesn't "immediaterender", instead the elements show in the regular state before the timeline and tweens start. Did 2.1 change the default behaviour of this?

See the Pen WPWdKE?editors=0010 by ReGGae (@ReGGae) on CodePen

Link to comment
Share on other sites

Yes, sort of. It was considered a "bug" (though I suppose that's arguable) that things would render immediately when the timeline was paused. Notice your timeline is initially paused, thus the from() tweens technically shouldn't render. See what I mean? 

 

You have two options: 

  1. Don't pause the timeline initially (there's really no reason to because you call play() on the same tick). 
  2. Specify immediateRender:true in your tweens to force it. 

To be clear, the new behavior only affects the DEFAULT value (when you don't specify immediateRender one way or the other). 

 

Does that help? 

  • Like 3
Link to comment
Share on other sites

2 minutes ago, GreenSock said:

Yes, sort of. It was considered a "bug" (though I suppose that's arguable) that things would render immediately when the timeline was paused. Notice your timeline is initially paused, thus the from() tweens technically shouldn't render. See what I mean? 

 

You have two options: 

  1. Don't pause the timeline initially (there's really no reason to because you call play() on the same tick). 
  2. Specify immediateRender:true in your tweens to force it. 

To be clear, the new behavior only affects the DEFAULT value (when you don't specify immediateRender one way or the other). 

 

Does that help? 


Makes sense, thanks:)

Link to comment
Share on other sites

Another way is to create the timeline in reversed state:

 

const tl = new TimelineLite().reversed(true);

 

  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...

Hmmm, I have a really big issue with this change since almost all of the animatiosn I've done are based on "from" tweens. There is a way to change the default behavior of "immediateRender" to true?

Link to comment
Share on other sites

In 2.1.0, we changed the default immediateRender for **paused** TimelineLite/Max from(), fromTo(), staggerFrom(), staggerFromTo() calls to be false because a few people considered it a "bug" to have a paused timeline render anything (including starting values). However, since releasing 2.1.0, it has come to our attention that the change made a bigger impact on our user base than anticipated and it was a pain point. It altered behavior, so we decided it's better to revert to the old default, and to introduce a change like this in a future major version update. My apologies for any confusion the 2.1.0 change caused anyone. 2.1.2 (just released) restores the old immediateRender defaults. And to be clear, this only ever affected timelines that were paused at the time the from()/fromTo()/staggerFrom()/staggerFromTo() calls were made. 

 

Does that clear things up? 

  • Like 3
Link to comment
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.
×