1/* 2 * smooth-scroll.js â Subtle Smooth Scroll 3 * ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ 4 * Very light momentum - responsive but with a tiny bit of inertia. 5 * Uses optimal Lenis settings for natural feel. 6 */ 7 8(function () { 9 10 // Check if user prefers reduced motion 11 const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches; 12 if (prefersReducedMotion) return; 13 14 // Initialize Lenis with heavy, smooth momentum 15 const lenis = new Lenis({ 16 lerp: 0.06, // Very low = strong inertia (continues scrolling after you stop) 17 duration: 1.8, 18 easing: (t) => Math.min(1, 1.001 - Math.pow(2, -10 * t)), 19 orientation: 'vertical', 20 gestureOrientation: 'vertical', 21 smoothWheel: true, 22 wheelMultiplier: 0.6, // Slower scroll with heavy feel 23 smoothTouch: false, 24 touchMultiplier: 2, 25 infinite: false 26 }); 27 28 // Animation loop 29 function raf(time) { 30 lenis.raf(time); 31 requestAnimationFrame(raf); 32 } 33 34 requestAnimationFrame(raf); 35 36 // Pause during entry overlay 37 const entryOverlay = document.getElementById('entryOverlay'); 38 if (entryOverlay) { 39 lenis.stop(); 40 41 const enterBtn = document.getElementById('enterBtn'); 42 if (enterBtn) { 43 enterBtn.addEventListener('click', () => { 44 setTimeout(() => lenis.start(), 600); 45 }); 46 } 47 } 48 49})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.