-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable scrollbar cause scroll behavior laggy #326
Comments
Do you have any FPS problems? From my side, I can't see any neither on the FPS counter nor with my eyes. Does removing the easing option change anything for you? |
I made a new comparison video and I enable the frame rendering stats. I'm using Chrome as well. Obviously, I don't have fps problem and there's a delay on the video left side. My.Video.mp4 |
I guess that can be expected. The animation when the scroll bar is enabled is performed using JS and the However, I'll be making some improvements on this so we can keep on testing things out. I'll keep you posted whenever I have a version you can try. |
Did 0.1.24 completely change how the scroll works? Before 0.1.24, It doesn't have this performance issue. I'm not sure if the older version uses the scrollTo function as well? The thing is in the older version, the scroll is smooth and the gsap scrollTrigger animation is smooth as well. |
Can you test it again with the files ont he dev branch? You can also install the dev branch from npm directly if you prefer: npm install "https://github.com/alvarotrigo/react-fullpage.git#dev" --save Note on the dist files you'll find the version 4.0.8 of fullPage.js where I replaced setTimeout for requestAnimationFrame. |
The option The body will now use |
You can try using |
fitToSection: false can solve this issue even in the 0.1.24 version. And "requestAnimationFrame version" doesn't change anything. It seems like it's not a performance issue. Properly, It's because CSS scroll snaps run immediately after the screen is close to the nearby section. which means CSS scroll snaps will be triggered when the screen is about to leave a section or about to enter a section. Eventually, the fullpagejs scroll and CSS scroll snaps will run together. And it causes the screen looks like laggy. Personally, I think GSAP scroll snap is so much better. GSAP provides so much more control than CSS scroll snaps. |
delete |
I don't think this is what is happening. The only difference is that now we are scrolling the
Can you share any examples? |
Here's the gsap snap example: https://codepen.io/petebarr/pen/qBOeVoz Here's the basic: https://www.youtube.com/watch?v=X7IBa7vZjmo&t=891s doc: https://greensock.com/docs/v3/Plugins/ScrollTrigger. Snap is one of the ScrollTrigger properties. |
Yeah, they don't seem to be using the CSS snaps property. Perhaps this is the way fullPage.js should go too. The CSS snaps feature creates a bit of trouble. |
After I updated to 0.1.24, The flickering was fixed perfectly. But the scroll behavior became so laggy. During the video, you can see the difference after I remove the scrollbar option. It's much smoother.
2022-05-13.02-18-58.mp4
Reproduction code: https://codesandbox.io/s/react-fullpage-js-example-forked-ylxyp2?file=/src/index.js
The text was updated successfully, but these errors were encountered: