Jump to content
Search Community

How can I inspect the current state of a timeline?

killroy 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 currently have a problem with a "dirty" timeline. No matter what I do to it, I can not get it to play, even after clearing, etc.

 

What properties should I inspect that might cause this timeline to refuse to play? It is not nested, and I have tried .clear() and .invalidate() as well as .startTime(0).

 

In isolation, a fresh timeline works fine.

 

I would like to know what properties I need to inspect to be able to identify the offending leftover data form previous use of this timeline, so I can learn more about how they work and how to clean one up. I am aware that I could simple throw it a way and use a new one, but ultimately I'd like to keep a record of all animations played on this timeline for later use to replay, etc.

 

Thanks,

Sven

Link to comment
Share on other sites

What makes you think there is residual data that's causing problems? 

 

You generally shouldn't need to mess with the startTime() at all unless you're trying to reposition it inside its parent timeline but since you said you're not nesting things, startTime() is irrelevant. 

 

If you want to start the timeline again from its start, just call yourTimeline.restart() or yourTimeline.play(0). 

 

.clear() should dump all the children. There's not a bunch of tasks you need to worry about in order to "clean" the instance or anything. Did you already try a simple clear(), then insert whatever other tweens you want, and then restart()? 

 

It's pretty tough to troubleshoot blind :(

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