darkroomengineering / lenis

How smooth scroll should be
https://lenis.darkroom.engineering
MIT License
8.52k stars 369 forks source link

Smooth scroll lagging on Safari low power mode #301

Closed madebywho closed 7 months ago

madebywho commented 7 months ago

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"

`

clementroche commented 7 months ago

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