Jump to content
Search Community

adding scrollSmoother to a ScrollTrigger page block the plugin

NoOneFreelanceCollective test
Moderator Tag

Recommended Posts

Hello Valerio here,


nice work with gsap its amazing and i'm discovering it.


I've been using scrollTrigger to animate a 360 photo in a canvas with position fixed. Then i discovered scrollSmoother, purchased the club, but if i enable it scrollTrigger stop to work.... 
i tried to solve it but i cannot find a solution, can you help me to understand the problem?

 

i let commented at the end of the js  the smoother to see the error.

// let smoother = ScrollSmoother.create()

 

thanks in advance,
Valerio.

See the Pen BaYByBz by NoOneDesign (@NoOneDesign) on CodePen

Link to comment
Share on other sites

12 hours ago, OSUblake said:

Welcome to the forums @NoOneFreelanceCollective

 

I'm not sure what you mean by it breaks. Can you be a little more descriptive because I'm not noticing any issues here?


So the page now is working correcly, but if you try to uncomment the" // let smoother = ScrollSmoother.create() " at the end of the JS, you will see that all stop working without error in console. 

 

 

 

 

Link to comment
Share on other sites

1 hour ago, Cassie said:

You have to define scrollSmoother first and you already are doing that at the top.

If you uncomment that out at the bottom you're defining it twice and after your scrollTriggers.

 

sorry but i'm new to js and scrollTrigger/Smoother, 

thanks both for the fast answer.

@Cassie in my first pen was only at the bottom commented, and magically @OSUblake managed to make it work just by uncomment the define of scrollSmoother, stupid me that i've tried to generate the error in codepen but in a different way. In my local version was still not working even copying the JS. The scrollTrigger was not working and only the ScrollSmoother was enabled, the "ring" and everthing was freezed. I've fixed by linking gsap and the rest with the local js version, without the CDN. Don't ask me why but now is working :D.

I will post the ended version of the website when i finish.

 

thanks anyway! 

 

Valerio.


 

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