Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script src="https://cdn.jsdelivr.net/gh/studio-freight/lenis@latest/bundled/lenis.js"></script>
- <script>
- const lenis = new Lenis({
- duration: 2.2,
- easing: (t) => Math.min(1, 1.001 - Math.pow(2, -10 * t)), // h
- direction: 'vertical', // vertical, horizontal
- gestureDirection: 'vertical', // vertical, horizontal, both
- smooth: true,
- mouseMultiplier: 1,
- smoothTouch: false,
- touchMultiplier: 2,
- infinite: false,
- });
- function raf(time) {
- lenis.raf(time);
- requestAnimationFrame(raf);
- }
- requestAnimationFrame(raf);
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement