Files
portfolio-photo/public/custom/smooth-scroll.js
T
Leon Tonhäuser b5d6a7f6e4 feat: Lenis smooth scroll (Framer-kompatibel, intensity=10)
Ersetzt html { scroll-behavior: smooth } durch Lenis v1.1.13 mit duration=1.0,

entspricht Framers SmoothScroll_Prod.js (intensity=10/10). Lenis bringt Anchor-

Handling und data-lenis-prevent seit v1.1 intern mit. Vendor-JS unter

public/custom/vendor/ (gleiche Ablage wie canvas-confetti).
2026-06-17 15:09:40 +02:00

11 lines
501 B
JavaScript

// Smooth scroll via Lenis. Ersetzt Framers SmoothScroll_Prod.js-Modul
// (intensity=10 → duration=1.0). Lenis macht Anchor-Handling + data-lenis-prevent
// seit v1.1 intern; MutationObserver für [data-frameruni-stop-scroll] ist auf dem
// statischen Export nirgends aktiv, also weggelassen.
(function () {
if (typeof Lenis !== 'function') return;
const lenis = new Lenis({ duration: 1.0 });
function raf(time) { lenis.raf(time); requestAnimationFrame(raf); }
requestAnimationFrame(raf);
})();