Rezza Posted July 16, 2023 Share Posted July 16, 2023 Hi All, I found a demo that is almost exactly what I want. not completely the same. I have some text horizontally (split components and inline) and want to repeat it. Then combine it with the scrollTrigger plugin so that when I scroll down or up the text will travel left or right based on the scroll but not pinned like in the above example. I created this one, but currently, the text doesn't repeat. gsap.to("#moving-text-expertise", { scrollTrigger: { trigger: "#moving-text-expertise", start: "top 70%", end: "top top", scrub: 1, markers: true, }, x: 800, duration: 5, }); Can anyone help me? See the Pen NWBLzWy by GreenSock (@GreenSock) on CodePen Link to comment Share on other sites More sharing options...
GSAP Helper Posted July 16, 2023 Share Posted July 16, 2023 It's pretty tough to troubleshoot without a minimal demo - can you please provide one that shows your attempt? Please don't include your whole project. Just some colored <div> elements and the GSAP code is best (avoid frameworks if possible). See if you can recreate the issue with as few dependancies as possible. If not, incrementally add code bit by bit until it breaks. Usually people solve their own issues during this process! If not, then at least we have a reduced test case which greatly increases your chances of getting a relevant answer. Here's a starter CodePen that loads all the plugins. Just click "fork" at the bottom right and make your minimal demo: See the Pen aYYOdN by GreenSock (@GreenSock) on CodePen If you're using something like React/Next/Vue/Nuxt or some other framework, you may find StackBlitz easier to use. We have a series of collections with different templates for you to get started on these different frameworks: React/Next/Vue/Nuxt. Once we see an isolated demo, we'll do our best to jump in and help with your GSAP-specific questions. Link to comment Share on other sites More sharing options...
Rezza Posted July 17, 2023 Author Share Posted July 17, 2023 Thanks for the guidance Here is the sample, But I still have a problem with how to fulfill the rest of the space on the right side. If they have a few texts. See the Pen yLQKKrr by rezawikan (@rezawikan) on CodePen Link to comment Share on other sites More sharing options...
Solution Cassie Posted July 17, 2023 Solution Share Posted July 17, 2023 Hi there, you may be overcomplicating this if you just want the text to scroll a little bit along the x axis? Here's a super simple example See the Pen jOQzeEq by GreenSock (@GreenSock) on CodePen or maybe? See the Pen QWOYQab?editors=0010 by Spyropoulos (@Spyropoulos) on CodePen That horizontalLoop helper is great but sometimes it's best to start with the most basic implementation and then layer on complexity as and when you need it. Hope this helps Link to comment Share on other sites More sharing options...
Rodrigo Posted July 17, 2023 Share Posted July 17, 2023 Hi, Maybe something like this? See the Pen GRwxamV by GreenSock (@GreenSock) on CodePen Hopefully this helps. Happy Tweening! Link to comment Share on other sites More sharing options...
Rezza Posted July 21, 2023 Author Share Posted July 21, 2023 Thanks for the answer. It can be an alternative. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now