Jump to content
Search Community

GSAP 3 Scroll Trigger Issue

Chandra Shekhar test
Moderator Tag

Recommended Posts

The problem is that you're nesting a scrollTrigger in a tween that's inside a timeline. By default, the timeline will start to play immediately, but the scrollTrigger pauses the tween instance it's on (a child of that timeline), thus the timeline completes immediately...and then when you scroll to the ScrollTrigger's starting point, it unpauses the tween which tells its parent "hey, the playhead has already gone past your end...wake up and adjust your startTime to jump ahead so I can play". 

 

You really shouldn't have a nested ScrollTrigger like that. It just causes logic challenges. The simple solution is to change your "tl.fromTo(...)" to "gsap.fromTo(...)". 

 

Does that clarify things? 

 

 

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