splinetool / react-spline

React component for Spline scenes.
MIT License
1.19k stars 59 forks source link

Non-passive event listeners #199

Open YevheniiKisel opened 3 months ago

YevheniiKisel commented 3 months ago

Hello, Spline community! I have a question regarding a non-passive event warning in the console, a.k.a "[Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event." which is also mentioned in the Lighthouse post-test recommendations. I have a problem exactly with scrolling, which feels "jumpy + low FPS" :). After a quick examination of the source code of the @splinetool/runtime there is indeed a lack of { passive: true } in the event listener declaration. ?

    "@splinetool/react-spline": "^4.0.0",
    "@splinetool/runtime": "^1.8.9",
    "next": "^14.2.3",

Here is a reference article: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md

I would really be thankful for your fix or any help.

Thank you!

olafrv commented 1 week ago

Example: https://my.spline.design/olafufoanime-eac50b1e97e47009815286a718bf5e84/

[Violation] Added non-passive event listener to a scroll-blocking 'wheel' event.
[Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event.