Jump to content
Search Community

Locomotive scroll weird behviour with GSAP

momo12 test
Moderator Tag

Recommended Posts

Because you didn't configure things properly - you forgot to call ScrollTrigger.update() when LocomotiveScroll updates: 

 

locoScroll.on("scroll", ScrollTrigger.update);

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

 

Of course I'd recommend switching to ScrollSmoother because it's totally integrated and uses native scroll :)

 

Anyway, enjoy!

  • Like 1
Link to comment
Share on other sites

10 minutes ago, GreenSock said:

Because you didn't configure things properly - you forgot to call ScrollTrigger.update() when LocomotiveScroll updates: 

 

locoScroll.on("scroll", ScrollTrigger.update);

 

See the Pen

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

by GreenSock (@GreenSock) on CodePen

 

 

Of course I'd recommend switching to ScrollSmoother because it's totally integrated and uses native scroll :)

 

Anyway, enjoy!

Yes my friend paid for that. And asked for help here but they told me share a demo. I don't know how I can share the code with you but not breaking the laws as people can copy and paste the code!!!

Link to comment
Share on other sites

12 minutes ago, GreenSock said:

Because you didn't configure things properly - you forgot to call ScrollTrigger.update() when LocomotiveScroll updates: 

 

locoScroll.on("scroll", ScrollTrigger.update);

 

 

 

Of course I'd recommend switching to ScrollSmoother because it's totally integrated and uses native scroll :)

 

Anyway, enjoy!

Thanks for this!

Link to comment
Share on other sites

Hi @momo12,

 

I'm curious about this:

1 hour ago, momo12 said:

Yes my friend paid for that. And asked for help here but they told me share a demo. I don't know how I can share the code with you but not breaking the laws as people can copy and paste the code!!!

When we refer to a demo, normally we require a minimal example that illustrates the situation you are experiencing. Normally we try to avoid real life code, since is often more complicated and verbose than a minimal demo. There is no obligation to share the code of the real life project, especially if you have an NDA or any other legal obligation with your customers.

 

Finally GSAP has a couple of ways to use the Bonus Plugins and tools without exposing the files Club GreenSock members download. One is to install the gsap-trial package, which will work on Codesandbox, Stackblitz and localhost:

npm install --save gsap-trial

The other is to use the URLs in this codepen:

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

 

Let us know if you have other questions.

 

Happy Tweening!

  • Like 2
Link to comment
Share on other sites

26 minutes ago, Rodrigo said:

Hi @momo12,

 

I'm curious about this:

When we refer to a demo, normally we require a minimal example that illustrates the situation you are experiencing. Normally we try to avoid real life code, since is often more complicated and verbose than a minimal demo. There is no obligation to share the code of the real life project, especially if you have an NDA or any other legal obligation with your customers.

 

Finally GSAP has a couple of ways to use the Bonus Plugins and tools without exposing the files Club GreenSock members download. One is to install the gsap-trial package, which will work on Codesandbox, Stackblitz and localhost:

npm install --save gsap-trial

The other is to use the URLs in this codepen:

 

See the Pen

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

by GreenSock (@GreenSock) on CodePen

 

 

Let us know if you have other questions.

 

Happy Tweening!

The trial is working ... What I was trying to avoid was exposing the code or using a JS and others can grab the code... 

The thing was even the file I have is complete and is what the club generated for us --> We still get this error from the Google Chrome console: which says the Scroll Smoother is not defined! I left it to my friend but I think somehow, we missed something when we generated the token. For now, we move forward with the Locomotive but return to Scroll Smoother later when everything is done.

  • Like 1
Link to comment
Share on other sites

48 minutes ago, momo12 said:

The trial is working ... What I was trying to avoid was exposing the code or using a JS and others can grab the code... 

It's totally fine to share the trial stuff because those only work on certain domains anyway. 

 

48 minutes ago, momo12 said:

The thing was even the file I have is complete and is what the club generated for us --> We still get this error from the Google Chrome console: which says the Scroll Smoother is not defined!

My guess is that maybe your friend got the "Simply Green" membership (lowest level) which does NOT come with ScrollSmoother. You need "Shockingly Green" or higher. 

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