Jump to content
Search Community

GSAP and detecting item in a timeline, while looping Marquee.

Ken Flores test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

Hey Gurus and amazing people of the GSAP community! 

Im trying to have a continues flow of having the middle word being red, anyone knows if there is a better gsap way? a way to detect the item that is in the middle to be able to turn it red? Perhaps with scrolltrigger? because i am not in the scrolling that may not be the way.. 

Also, when I clone the track and then I scan items again, it just keeps going up in blanks instead of looping.. 
thanks for your help in advance! 

See the Pen eYopjjY by kenneth-brian-flores (@kenneth-brian-flores) on CodePen

Link to comment
Share on other sites

  • Solution

Hi @Ken Flores. Seamless loops are actually a lot more tricky than you might expect logic-wise (unrelated to GSAP). That's why we made a helper function for that:

https://gsap.com/docs/v3/HelperFunctions/helpers/seamlessLoop

 

Here's what I think you were trying to do, but this is much more efficient: 

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

 

Does that help?

 

Thanks for being a Club GSAP member! 💚

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