Skip to content
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

Issue when chaging the mouse button controls for TrackBallControls #409

Open
Logarithme opened this issue Feb 24, 2025 · 0 comments
Open
Labels
bug Something isn't working

Comments

@Logarithme
Copy link

  • three version:
  • @types/three version:
  • three-stdlib version: 2.35.14

Problem description:

I'm currently writing a mesh viewer using react. I'm using the react-three/drei library https://github.com/pmndrs/drei wich relies on three-stdlib.

I noticed that I could not change the mouseButtons for my TrackballControls, and it seems closely related to this threejs issue:
mrdoob/three.js#26366
Is it possible that it is the same bug ?

Relevant code:

I try to do this to rotate both on the left and right button, but it causes the right button to zoom or dolly instead, it's quite mysterious :S

<TrackballControls
  target={[0, 0, 0]}
  mouseButtons={{
    LEFT: THREE.MOUSE.ROTATE,
    MIDDLE: THREE.MOUSE.PAN,
    RIGHT: THREE.MOUSE.ROTATE
  }}
/>

Suggested solution:

It seems there is a solution described here: mrdoob/three.js#26366

I'm not very good at react and threejs so maybe I got the bug completely wrong, I hope you'll be able to check it ...
I'll try to answer any questions you may have to the best of my abilities.

Thank you for all your work :)

@Logarithme Logarithme added the bug Something isn't working label Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant