Jump to content
Search Community

Master timeline woes

smallio 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 guys,

 

Trying to get better at controlling multiple timelines at once. 

 

I've gone with the multi-function + call/add method here, however because I've used functions I think it's stopping me from using .timeScale on the main timeline? I'd love to be able to reverse & mess with the timeScale of it, but it's not letting me. 

 

Secondly, I can't get rid of the little white parts that my masks cover, no matter how big I make the strokes.

 

Are there any little hacks people know to get around both of these issues? 

 

Best,

Smallio

 

 

See the Pen yxLJdm?editors=0010 by smallio (@smallio) on CodePen

Link to comment
Share on other sites

You are adding functions to your timeline, not the animations that are created and returned by those timelines.

stars // reference to a function

stars() // calls the function and returns an animation

 

bad

 

masterTimeline.add(stars)
              .add(the, "-=0.2")
              .add(midnight, "+=0.2")
              .add(studio, "+=0.7")
              .add(twothousandeighteen, "+=0.5")

 

good

 

masterTimeline.add(stars())
              .add(the(), "-=0.2")
              .add(midnight(), "+=0.2")
              .add(studio(), "+=0.7")
              .add(twothousandeighteen(), "+=0.5")

 

See the Pen NLWpvZ?editors=0010 by GreenSock (@GreenSock) on CodePen

 

In the future please try to supply a reduced test case. I'm sure you could illustrate the same issues with 90% less code. Perhaps 2 nested timelines each with 2 tweens in them and an SVG with just a handful of shapes.  

 

For the mask issue, any chance you can simplify this down to 1 shape, 1 mask and one tween? Would make it much easier to investigate. Thanks

 

 

  • Like 5
Link to comment
Share on other sites

I think I've fought most every SVG mask battle imaginable and I can probably help, but that is a massive amount of code to sort through. As @Carl mentioned, a stripped down version with one masked group would help us troubleshoot.

 

You may also want to take a look at my post about Adobe Illustrator exports here:

 It will make things much easier for you.  

 

Happy tweening.

:)

 

  • Like 5
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...