-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use window for pointerevents #581
Comments
Hey @acvigue . Thanks for the feature request. Maybe someone else can help in the meantime, but this sounds like it might fit in well with what I've been working on for v4 or after, depending on what the team thinks. I'll add this to my personal to-do list, anyway. To get a better idea of the requirements, would it be possible to post your workaround below? Even a bit of pseudocode would be fine. Or if you pulled it from a Three.js example, a link would be great! |
Hi! Thanks. Yeah, I'm using nuxt 3 with native threejs and just use window.createeventlistener("pointermove" / "pointerenter" / "pointerleave") instead of tying the events directly to the canvas element. Edit: Still using same raycaster logic and all but am just listening to events from the window instead of element if that makes more sense |
Description
I have a TresCanvas with a lower z-index that is under the main content on my site. I got around this in native Three by using events based on window pointer events. I don't see a way to do this in Tres.
Suggested solution
Add a prop to TresCanvas like window-size (window-pointer?) to use window pointer events instead of attaching events to the canvas itself
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: