pmndrs / three-stdlib

📚 Stand-alone library of threejs examples designed to run without transpilation in node & browser
https://npmjs.com/three-stdlib
MIT License
704 stars 117 forks source link

Non-passive event listener to a scroll-blocking 'wheel' event #352

Closed satelllte closed 5 months ago

satelllte commented 6 months ago

[!NOTE] This is not a bug, but just a console warning and a small thing to improve. So please consider it.

Versions

Problem description:

[Violation] Added non-passive event listener to a scroll-blocking 'wheel' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952

Suggested solution:

Put passive: true here: https://github.com/pmndrs/three-stdlib/blob/017639d81eb65b3a69b334ec1792efcf6f4a2215/src/controls/OrbitControls.ts#L412