Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Alexey Matlash

ScrollTrigger Snap issue

Go to solution Solved by GreenSock,

Recommended Posts

Wussup, GSAP!

I`m experiencing some issues with snapping.
My snap performs very laggy fo no reson. Here is my ST code:
image.png.2b4f2b5dd4f01d61c093f9f586f19db6.png 
Here is an example of this snap performing at chrome mobile- 

 

And this is how it performs on my desktop (Yet another Russian local browser (chromium)). I have the same experience on different browsers including Chrome itself.- 

 

I`d like to say that my code is buggy, but all actual codeOpen demo examples of ScrollTrigger`s snap (from docs) are laggy on my desktop too.

I briefly looked for latest snap related topics and found this post.
https://greensock.com/forums/topic/25479-full-screen-sections/?do=findComment&comment=123493
So @akapowl, you might be interested too. Your demos, where you downgraded ScrollTrigger and GSAP to v3.4.2, works perfectly fine with snapping.


Any other machines I tested works good.
Is there a possibility it`s related to AMD processor I`m using? Or may be it`s Windows Insider program? Dunno. Any ideas what kind of information about my system could help with solving this issue.

P.S. Have no idea, how to mention concrete person at this forum correctly(

Link to post
Share on other sites

Yep. just downgraded to 3.4.2, and snapping is smooth as it should be.
Gonna use it for a while. Until the latest version will handle my problem. Any possible disadvantages?

Link to post
Share on other sites

Hey Alexey. Sorry to hear about the performance issue. Can you please share a minimal demo where the snapping is laggy with us so that we can test? It's pretty hard to debug blindly. 

Link to post
Share on other sites

Sorry, I didn`t think that you need any special demo unless that one in the documentation.
UPD: It works fine after update to 3.6.0

See the Pen YzygYvM by GreenSock (@GreenSock) on CodePen


Here is the video how this demo works:


I also understand that my case (and probably akapowl`s) is full of mistery. And i have no idea how to debug or even reproduce it. All i can do is give you full information of my system. Or even a some kind of teamviewer, so you can take a look how your demo performs at my PC.

Everything I know for now - 3.4.2 has no any difficulties with snapping. but 3.51 does. And it reproduces both via codeOpen and my local Vue project (but only at my PC).

Link to post
Share on other sites
24 minutes ago, Alexey Matlash said:

it reproduces both via codeOpen and my local Vue project (but only at my PC).

So you're saying if you publish your Vue project online it still doesn't work on your computer? But if you view the same site on a different device it works?

Link to post
Share on other sites
2 hours ago, ZachSaucier said:

So you're saying if you publish your Vue project online it still doesn't work on your computer? But if you view the same site on a different device it works?

Exactly! I published it online. Tested on android, my laptop and my PC. only PC got that issue.

Link to post
Share on other sites

 

Just to confirm, this indeed looks like what I was experiencing / talking about in this thread

 

 

 

 

 

...but for me it only appeared in combination with codepen.io and Opera.

 

When openening the same setup from a local folder, even in Opera it was all buttery smooth with 3.5.1 (Reverting to 3.4.2 also did the trick for me on codepen, back then.)

 

Edit:

Just now, I notice the same behaviour as back then, on the ScrollTrigger demo-pen above:

In the preview-frame in this window here, it works as its supposed to, as soon as opened on codepen.io, it lags as it does in the video.

 

 

 

 

 

  • Thanks 1
Link to post
Share on other sites
  • 3 weeks later...

Would you mind testing the preview of the upcoming release and letting us know if that resolves things for you? https://assets.codepen.io/16327/ScrollTrigger.min.js

 

The issue had to do with a browser bug where it'd misreport the scrollTop/scrollLeft by one pixel. So if ScrollTrigger set it to 125, for example, and then immediately checked it, the browser would report it as 124 which caused ScrollTrigger to stop the snap because it assumed the user was attempting to manually scroll. The latest preview implements a threshold of 2 pixels before making that assumption. 

  • Like 3
Link to post
Share on other sites
  • 2 weeks later...

@GreenSock WOW!
Thanks for your attention to my question!
Yep, I`ve just checked one of documentation demos and noticed they got now 3.6.0 and everything works fine for me.
Sorry for inactivity and delayed answer

  • Thanks 1
Link to post
Share on other sites

Also, Have you any idea why it affects only me, and may be literally a couple of persons in the world?

Do you got any open schedule or roadmap for releases? I`d like to get new version via npm.
It`s OK to use min.js file, but ofc npm is more suitable

 

Link to post
Share on other sites

It seems to only affect people who have the screen zoomed. There may be other factors in terms of which browser versions had the browser bug that misreports things. 

 

As for timing, I can't really say at this point. We're working hard on a new plugin that's a highlight of 3.6.0 but it's rather complex. My guess is a few weeks at this point. Rest assured that we're not sitting around delaying things intentionally - we're actively working on this every day. :)

 

Cheers!

Link to post
Share on other sites

 

15 hours ago, GreenSock said:

we're not sitting around

 I`m sorry, if you found it impolite 😅 I`m 100% sure you are doing your best! Thanks for your time, great lib, awesome plugin ;)
 

15 hours ago, GreenSock said:

It seems to only affect people who have the screen zoomed

Yep, I got 1440p and Windows setting for 125% text and apps scale. And guess what happened when I set it to 100% ? It works perfect even at 3.5.1.
I can barely imagine how did u manage to found this out. Thanks again!

Link to post
Share on other sites
7 hours ago, Alexey Matlash said:

 I`m sorry, if you found it impolite 😅 I`m 100% sure you are doing your best! Thanks for your time, great lib, awesome plugin ;)

Oh no, I didn't take it in a negative way at all. No worries :) Sorry if my response came off as snarky or something. I didn't mean it that way. 

 

Cheers!

Link to post
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.

×