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).
11 lines
501 B
JavaScript
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);
|
|
})();
|