Jump to content
GreenSock

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

TimelineMax render() method, what is for force: Boolean parameter?

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

Hello, I will appreciate if you could help a newbie. At moment I perform documentation examination, and I met https://greensock.com/docs/TimelineMax/render() render()  method. Could someone explain me please, what is parameter force for?

 

Thanks in advance.

Link to comment
Share on other sites

Sorry about any confusion there - it actually shouldn't even be in the docs (I just removed it). You can ignore that method. It is valid, but it's generally for internal use. It just forces the tween/timeline to render its state at a particular time but it does NOT adjust its position on its parent timeline. So it's a little bit like seek() or time() or totalTime() but without aligning the playhead with the parent timeline's. It the vast majority of cases, though, you'd WANT the playheads to align so that the tween/timeline would continue on playing from that point. 

 

The "force" parameter, when true, will force the render to occur even if the last render was at exactly the same time. GSAP is highly optimized, so it'll skip rendering at a particular spot if that's where the playhead is already positioned (because in most cases, that's wasteful). But there are some rare occasions when it's helpful to force it. Again, this method isn't generally intended for end users to call. 

 

If you need help accomplishing something in particular, just let us know and we'll do our best to help. 

  • Like 3
Link to comment
Share on other sites

Thank you very much for help!

  • 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.
×