Jump to content
Search Community

Infinite text

De Internetarchitect test
Moderator Tag

Recommended Posts

Hi,

 

The Horizontal Loop helper has a paddingRight config option to create that separation between the last and first items:

const loop = horizontalLoop(elements, {
  ...
  paddingRight: 100,
});

Is worth noticing that since you're using tailwind the gap between items is set with rem, while there is no issue with it, that could lead to different values so is better to set that in your stylesheet as a fixed value in pixels.

 

As for the overlapping if you're using a custom font better wait for the font to be loaded and rendered before creating the loop instance:

https://developer.mozilla.org/en-US/docs/Web/API/Document/fonts

 

Here is a fork of your demo, I added a 1 before the first element and an uppercase L at the end of the last in order to identify those:

See the Pen wvZMwez 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...