Jump to content
Search Community

Timeline woes

Gabriel 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

Just when I think I got the timeline figured out, I run into more strange stuff. I'll try to keep this simple:

tl.set(o,{visibility:'hidden'},0)
  .set(o,{visibility:'visible', immediateRender:false},offset)
  .from(o,time,fx,offset)

This animates two objects from a function, with "fx" being an object with the properties to tween.

tl.play(0)

No problem here. Makes the objects visible at the proper time, and moves object "A" into place by animating "x", and adjusts the opacity of object "B" from 0 to 1.

tl.reverse(0)

Again, no problem. Reverses the animation, with them ending by setting visibility to "hidden".

tl.play(0)

This time, object "A" remains hidden (visibility:hidden), but object "B" is visible and animates the opacity properly. Object "B" is acting normally, but object "A" has disappeared, what's going on?

 

Link to comment
Share on other sites

Two questions:

  1. Are you using the latest version? (1.9.8 right now)
  2. Can you please create a codepen or jsfiddle that demonstrates this so that we can see it in context? It sounds kinda like you've created a conflict somewhere, but it's tough to tell without seeing things in context. 
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...