Jump to content
Search Community

infinite marquee

thetobiterra test
Moderator Tag

Go to solution Solved by Rodrigo,

Recommended Posts

Hello, so recently i've been trying to come up with my own logic and approach to some very popular animations out there. I coded this up but for some reason, none of the marquee gets positioned back to the end of the other and i can't seem to understand why. Is my approach wrong? please help if you can

See the Pen NWeLWGa?editors=0100 by the0xtobi (@the0xtobi) on CodePen

Link to comment
Share on other sites

2 hours ago, mvaneijgen said:

Instead of rolling your own have you seen the "Seamlessly loop elements along the x-axis" helper function from the docs? https://greensock.com/docs/v3/HelperFunctions#loop

oh i know about the helper function, it's just that i like to think of how something would work and try it out myself sometimes. In this case, i thought this code made sense and would work and since it didn't,  i'm just confused

Link to comment
Share on other sites

  • Solution

Hi,

 

If you want to create your own implementation (although in production I'd strongly recommend using the Helper Function) you should use the Modifiers Plugin:

https://greensock.com/docs/v3/GSAP/CorePlugins/ModifiersPlugin

 

Here is an example:

See the Pen QEdpLe by GreenSock (@GreenSock) on CodePen

 

Hopefully this helps

Happy Tweening!

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