Jump to content
Search Community

GSAP v2.1 immediateRender

nomatter test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I just started a new project and I installed the latest version of GSAP (v2.1.1). I read on the changelog of v2.1.0 that:

 

Quote

TimelineLite/Max.set() consistently has its immediateRender default to false now.

 

I was experimenting with a TimelineMax timeline that has various `.fromTo()` and `.from()` calls and it appears that `immediateRender` is also set to `false` on these functions as well (only when the timeline has `paused` set to `true` and I play it later on). I wanted to ask: Is this the expected behavior? If not, I guess something could be wrong with my setup. If yes, I think the documentation should be updated so that folks do not get confused. Right now the TimelineMax.from() documentation reads:

 

Quote

NOTE: By default, immediateRender is true in from() tweens, meaning that they immediately render their starting state regardless of any delay that is specified. You can override this behavior by passing immediateRender:false in the vars parameter so that it will wait to render until the tween actually begins.

 

Link to comment
Share on other sites

Yes, that's all correct. The immediateRender won't default to true if the timeline is paused (some people saw it as a bug if a timeline is paused but the tweens rendered anyway). See what I mean? 

 

Are you saying that the docs need to mention the way the paused state affects the default immediateRender on from()/fromTo()?  

  • Like 2
Link to comment
Share on other sites

Thanks a lot for the super quick response and the clarification Jack! It's a lot clearer now.

 

8 minutes ago, GreenSock said:

Are you saying that the docs need to mention the way the paused state affects the default immediateRender on from()/fromTo()?  

 

Correct. I saw that you already updated the docs, so thanks for that as well :)

  • Like 3
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 2
Link to comment
Share on other sites

That is a really good news for me, thanks! To be clear, almost every implementation of timeline I use has an initial stop because depends of the loading of other content such audio or svg via AJAX. This change will help my work a lot!

  • Like 1
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.
×
×
  • Create New...