Jump to content
Search Community

Infinite marquee loop

Dooshan test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

  • Solution

It's hard for me to decipher what you were trying to do there, @Dooshan but...

  1. There were errors in your JavaScript (adding an event listener to a null object for example)
  2. You were creating two completely different infinite loops simultaneously with totally different techniques on the same elements, so they were conflicting with each other. 
  3. You had extra code in there that wasn't serving any purpose at all. 

Are you trying to do this?: 

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

Link to comment
Share on other sites

48 minutes ago, GreenSock said:

It's hard for me to decipher what you were trying to do there, @Dooshan but...

  1. There were errors in your JavaScript (adding an event listener to a null object for example)
  2. You were creating two completely different infinite loops simultaneously with totally different techniques on the same elements, so they were conflicting with each other. 
  3. You had extra code in there that wasn't serving any purpose at all. 

Are you trying to do this?: 

 

 

Exactly! Thanks. I'm sorry, I shouldn't have play with the original pen. 

Link to comment
Share on other sites

Hi,

 

The loop helper function has a config object you can pass. In that object you can specify a speed property:

 - Optionally pass in a config object with values like "speed"
   (default: 1, which travels at roughly 100 pixels per second),
   paused (boolean), repeat, reversed, and paddingRight.

If you want to make it slower just add a value of less than 1:

const loop = horizontalLoop(boxes, { repeat: -1, speed: 0.75 });

Happy Tweening!

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