Jump to content
Search Community

Ways to approach changing durations.

folktrash 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

Hi!

 

I'm curious if there's a good way to manage changing durations. I don't have code snippet handy atm, but the situation is this: We have a series of animations/scene. There's the intro timeline, the waiting timeline, and the outro timeline. It's a loader scene.

 

The intro and outro are their own var'd new TimeLineMax(), with a series of tweens. These animations have static duration, e.g. the intro takes one second, and the outro takes 2 or whatnot.

 

The waiting timeline is a repeating series of .to()'s saved into a var'd timeline. The total time is variable based on bandwidth and filesize. I'd like to alter the duration the containing tweens (independently if possible), as the total wait time increases; Speeding up the repeating effect (reducing the duration) the longer we're waiting.

 

I can navigate an onComplete that checks some bool and restart()'s that timeline to "get" a repeating animation without using repeat explicitly. Related: is there an API for timeline.repeateUntilFurtherNotice()? I didn't see one (https://www.greensock.com/asdocs/com/greensock/TimelineMax.html#methodSummary).

 

Either way - what is a good approach for modding the duration of tweens inside a timeline when the total duration is variable/unknown?

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