Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Mauro.ie31

Remove ease on Horizontal Scroll

Recommended Posts

Hello there,

I developed my website using ScrollTrigger with Horizontall Scrool

As you can see there is an ease scrolling (when reaching the end of the website it's necessary to scroll with more intensity respect of the beginning of the website).

This is my code :

 

    const sections = gsap.utils.toArray(".panel");
    let maxWidth = 0;
    let index = 0;
    const getMaxWidth = () => {

      maxWidth = 0;
      sections.forEach((section) => {
        maxWidth += section.offsetWidth;
      });
    };
  
    var masterScrollTrigger = gsap.to(sections, {
      x: () => `-${maxWidth - window.innerWidth}`,
      //ease: "Power0.inOut",
      ease:"Linear.easeNone",
      scrollTrigger: {
        trigger: ".container-scroll",
        pin: true,
        scrub: 1,
        end: () => `+=${maxWidth}`,
        invalidateOnRefresh: true

      }
    });

Question is: How do I remove the ease effect and make the scroll "linear" at the start of the website and at the end?

Thanks

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