Closed haydenlinder closed 3 years ago
Have you tried with pointer-events: none;
?
Have you tried with
pointer-events: none;
?
On the scrollarea?
I have no idea how you setup is like, if you provide a codesandbox we may help you better.
However, if you put the css property pointer-events: none
on an element, the mouse events will fall over to the underlying element.
Placed on the scrollarea, it does allow pointer events to pass through, but then it disables scroll events.
I have also tried adding an onWheel to the wrapper of the Canvas, but that doesn't work on mobile phone scroll.
Here's the code - https://github.com/haydenlinder/portfolio
I was able to resolve by ditching the scrollarea and placing onWheel for desktop and onTouchStart and onTouchMove for mobile on the parent div of the Canvas.
The solution is implemented in src/App.js in the repo linked above.
Hello,
I'm currently using a scrollarea to position some of the content in my scene.
I would like to use react-three-fiber events on meshes like onPointerEnter also, but the scrollarea is blocking events to the canvas.
Any ideas?