Jump to content
Search Community

Wavy text on path - GSAP

jillianadriana test
Moderator Tag

Recommended Posts

Hey friends,

 

I am working on some wavy text inspired by this effect: 

See the Pen VwpOeaL by jillianadriana (@jillianadriana) on CodePen

 

I am using Locomotive Scroll for the page I'm working on, which I'm assuming is why the vanilla JS version won't work as-is, so I'm attempting to build a GSAP version.

 

I have searched and searched and have tried to piece together a solution but obviously it isn't working the way I'd like. I spent most of my weekend on this and I have decided to just come ask for help directly.

 

I have used snippets of code pulled from various threads here and I've watched most of Carl's videos in Creative Coding Club, but I do have learning disabilities, so things just don't stick in my brain as well as I wish they would. That's why I tend to learn by doing, and I end up having to do things over and over and over before I finally get the hang of it. I say all of that to explain that I am not looking for shortcuts or someone to do the work for me. I am trying my best :)

 

J

See the Pen eYvXXYy by jillianadriana (@jillianadriana) on CodePen

Link to comment
Share on other sites

Hey @jillianadriana

 

With how locomotive-scroll works, the height of your body is not essential for things being scrollable - instead, the height of your scroller-element is.

Also, position: fixed won't work the way you'd expect because of transforms applied to the scrollable container element - things set to position: fixed will just scroll with the flow.

 

In this following example both - the height for it to be scrollable and the keeping things in position during scroll - are handled by pinning the section (which I removed the data-scroll-section attribute from for it to work) that contains your SVG and the end of the ScrollTrigger set to "+=500%"

 

See the Pen 38462411b5d76201fa435f44987578a9 by akapowl (@akapowl) on CodePen

 

 

 

But Blake is totally right - locomotive-scroll is not a GSAP product and thus support for it is actually not offered here.

 

If you consider keeping to use it, I would suggest getting familiar with how it works and what is essential for it to work properly in the first place - otherwise you'll likely run into lots of roadblocks further down the line.

 

On a different note; adding ScrollTriggers to individual tweens of a timeline as you tried in your pen above is one of the most common ScrollTrigger mistakes and you shouldn't do it like that.

 

Happy scrolling!

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