darkroomengineering / lenis

How smooth scroll should be

Home Page:https://lenis.darkroom.engineering

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Smooth scroll lagging on Safari low power mode

madebywho opened this issue · comments

Hi all,

I'm new to this and my knowledge in coding is very bad ;), so my apologies if this issue already has been asked, but I'm facing some problems with lenis smooth scroll on Safari. It is a bit laggy when my Macbook is not connected to the charger. However, it does work when my it is connected, or when I'm using the Chrome browser. Does anyone know if it is possible to fix this?

I'm using this code from Off Brand:

`<script
data-id-scroll
data-autoinit="true"
data-duration="1"
data-orientation="vertical"
data-smoothWheel="true"
data-smoothTouch="false"
data-touchMultiplier="1.5"
data-easing="(t) => (t === 1 ? 1 : 1 - Math.pow(2, -10 * t))"
data-useOverscroll="false"
data-useControls="true"
data-useAnchor="true"
data-useRaf="true"
data-infinite="false"
defer
src="https://uploads-ssl.webflow.com/645e0e1ff7fdb6dc8c85f3a2/653b82ecf87f552a98ac66b9_lenis-master-offbrand.02.txt"

</script>`

Safari runs 30fps on low power mode and there is nothing we can do about it, that's an Apple policy.