Jump to content
Search Community

Scrolltrigger pin: is a smoother stop possible?

rubenmeines test
Moderator Tag

Recommended Posts

Hi there,

 

I am working with scrolltrigger and I am pinning some full sized background images when they hit the bottom (see code). The only thing is that on mobile the stop is quite abrupt and sometimes has a bit of a back kick. So my question is if there is a possibility to smoothen this stop and if somebody has had this issue before as well?

 

gsap.to(scene, {
  scrollTrigger: {
    trigger: bgVisual,
    endTrigger: nextScene,
    start: "bottom 125%" ,
    end: "bottom -=5%",
    scrub: true,
    pin: true,
  },
});

Hope this is clear. 

Link to comment
Share on other sites

1 hour ago, rubenmeines said:

The only thing is that on mobile the stop is quite abrupt and sometimes has a bit of a back kick. So my question is if there is a possibility to smoothen this stop and if somebody has had this issue before as well?

 

Hey @rubenmeines

 

The kick you are experiencing can be related to a variety of things, depending on how you have things set up.

Since what that 'kick' is, can also be interpreted in different ways, it would probably be best if you created a minimal demo of your issue.

 

Most likely it is related to how browsers handle the scrolling on a different thread and that makes it hard to sync things up.

If tailbreezy's suggestion with anticipatePin doesn't work for you, maybe these threads can be helpful

 

 

 

  • Like 4
Link to comment
Share on other sites

Thanks guys, the anticipate pin did improve some of it, but had some issues with browser resizing on mobile due to the browsers bars shrinking. In the end the client decided it did not like the effect at all so I'm moving on from it, until it comes on my path again.

 

Thanks for the great support. I'm gonna keep exploring Scrolltrigger!

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