Jump to content
Search Community

Scrolltrigger Snap Delay

savorygreatness test
Moderator Tag

Go to solution Solved by savorygreatness,

Recommended Posts

I'm the fixer for a client project and I'm trying to get horizontal snap scroll looking tight. I'm noticing a slight delay between the time scroll settles and the snap takes place — any clues as to how to remove it to get it to feel more responsive? I'm using ScrollSmoother as well.

 

Site: https://archsoldev.wpengine.com

 

Here's my setup: 

 

            tl = gsap.timeline({
                scrollTrigger: {
                    trigger: ".panel-wrap",
                    pin: true,
                    anticipatePin: 1,
                    fastScrollEnd: true,
                    scrub: 0,
                    onSnapComplete: self => {
                        if ($(".site-header").hasClass("mini") == false && window.scrollY > 0) {
                            $(".site-header").addClass("mini");
                            $(".hide--scrolled").fadeOut(function() {
                                $(".show--scrolled").fadeIn();
                            });
                            window.setTimeout(function() {
                                ScrollTrigger.refresh();
                            }, 250);
                        }
                    },
                    snap: {
                      snapTo: 1 / (sections.length - 1),
                      duration: {min: 0.02, max: 0.5},
                      delay: 0.1
                    },
                    start: "top top",
                    end: "+=3000"
                }
            });

 

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.
×
×
  • Create New...