fix(perf): eliminate double-damping lag, layout thrashing, and optimize horizontal scroll speed
This commit is contained in:
@@ -9,13 +9,13 @@ export function SmoothScroll() {
|
||||
if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return;
|
||||
|
||||
const lenis = new Lenis({
|
||||
duration: 1.15,
|
||||
duration: 0.95,
|
||||
easing: (t) => Math.min(1, 1.001 - Math.pow(2, -10 * t)),
|
||||
orientation: 'vertical',
|
||||
gestureOrientation: 'vertical',
|
||||
gestureOrientation: 'both', // Allows trackpad horizontal and vertical gestures
|
||||
smoothWheel: true,
|
||||
syncTouch: false, // Preserves hardware 120Hz momentum touch scrolling on phones & tablets
|
||||
wheelMultiplier: 0.95,
|
||||
wheelMultiplier: 1.0,
|
||||
touchMultiplier: 1.0,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user