laplage Posted October 15, 2023 Share Posted October 15, 2023 Hi, I've created a vertical slide animation, with pinned images and text blocks appearances Y transforms. On Desktop, Chrome, Firefox and Safari everything works perfectly, but on iOS with Safari and Chrome the pinning is set late, and the text animations are slow.. Here is the website preview URL we published https://lyoncasting.dodev.stereoweb.fr/ And the source code "powering“ it https://gist.github.com/nicolasbinet/f38de716b131d634394a77a00f248efb If anyone has any idea ... thanks a lot in advance. Nicolas Link to comment Share on other sites More sharing options...
GSAP Helper Posted October 15, 2023 Share Posted October 15, 2023 I don't have much time to dig into this, but have you tried setting ScrollTrigger.normalizeScroll(true) and/or ScrollTrigger.config({ ignoreMobileResize: true })? Beware that iOS Safari has a ton of bugs related to scrolling (those bugs are in the browser, not GSAP/ScrollTrigger). We've spent literally hundreds of hours try to solve/workaround them but there's no silver bullet. Apple has admitted that it's impossible to properly synchronize scrolling with the main thread. The above solutions tackle various challenges, but may not make it all exactly perfect. Link to comment Share on other sites More sharing options...
laplage Posted October 16, 2023 Author Share Posted October 16, 2023 Hi, Thanks a lot for this help and clarification. The "ignoreMobileResize" config property seems to help with the Text animation, not much with the slide being pinned late or not as quick as I would have imagined from the examples I've checked. Nicolas Link to comment Share on other sites More sharing options...
Solution Rodrigo Posted October 16, 2023 Solution Share Posted October 16, 2023 Hi, Did you tried normalizeScroll()? That normally helps with issues like the one you're describing: https://gsap.com/docs/v3/Plugins/ScrollTrigger/static.normalizeScroll() Hopefully this helps. Happy Tweening! Link to comment Share on other sites More sharing options...
GreenSock Posted October 16, 2023 Share Posted October 16, 2023 There's also an anticipatePin value you can set to have it try to pin beforehand. anticipatePin Number - If you pin large sections/panels you may notice what looks like a slight delay in pinning when you scroll quickly. That's caused by the fact that most modern browsers handle scroll repaints on a separate thread, so at the moment of pinning the browser may have already painted the pre-pinned content, making it visible for perhaps 1/60th of a second. The only way to counteract that is to have ScrollTrigger monitor the scroll velocity and anticipate the pin, applying it slightly early to avoid that flash of unpinned content. A value of anticipatePin: 1 is typically fine, but you can reduce or increase that number to control how early it does the pinning. In many cases, however, you don't need any anticipatePin (the default is 0). Link to comment Share on other sites More sharing options...
laplage Posted October 30, 2023 Author Share Posted October 30, 2023 Sorry for this late reply. First thanks a lot for all your answers. I used normalizeScroll and anticipatePinand this helped smoothing the behavior. Nicolas 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now