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

New Arcball controls #21989

Merged
merged 39 commits into from
Sep 9, 2021
Merged

New Arcball controls #21989

merged 39 commits into from
Sep 9, 2021

Conversation

danielefornari
Copy link
Contributor

Description

Added brand new ArcballControls inspired by the one of Meshlab.
This is part of my bachelor thesis project at Visual Computing Lab

@malomo
Copy link

malomo commented Jun 15, 2021

The example, included into the pull request, is here.

@haywirez
Copy link

haywirez commented Jun 16, 2021

@danielefornari would like to invite you to add this to https://github.com/pmndrs/three-stdlib! 💚

@mrdoob mrdoob added this to the r130 milestone Jun 17, 2021
@mrdoob mrdoob modified the milestones: r132, r133 Aug 26, 2021
@cignoni
Copy link
Contributor

cignoni commented Aug 31, 2021

So it is accepted and planned to be included the 133 release? That would be great! 😀

@Mugen87
Copy link
Collaborator

Mugen87 commented Aug 31, 2021

@mrdoob has still to review the PR but from my point of view it is good to go!

@mrdoob
Copy link
Owner

mrdoob commented Sep 1, 2021

Hmm, would it be possible to use the right mouse button for panning?
Right now is not possible to pan the model with a trackpad only (and no keyboard).

@malomo
Copy link

malomo commented Sep 1, 2021

Hmm, would it be possible to use the right mouse button for panning?
Right now is not possible to pan the model with a trackpad only (and no keyboard).

Right now panning is possible using the ctrl modifier (cmd on macOS)

@mrdoob
Copy link
Owner

mrdoob commented Sep 1, 2021

Yes, I know. But if you don't have a keyboard you can't pan.

@danielefornari
Copy link
Contributor Author

Hmm, would it be possible to use the right mouse button for panning?
Right now is not possible to pan the model with a trackpad only (and no keyboard).

We are thinking to overcome this limitation by adding a function which allows to associate a certain mouse/keyboard action with an operation. In this way one can also set mouse right button for panning.

@mrdoob
Copy link
Owner

mrdoob commented Sep 3, 2021

That sounds good to me 👍
Are you going to implement it in this PR?

@danielefornari
Copy link
Contributor Author

Yes, i will work on it these days

@danielefornari
Copy link
Contributor Author

Functions to set/remove an association between an operation and a mouse/keyboard action has been added, so now inputs to perform operations can be customized anytime! Zoom/FOV manipulation can be also be associated with a mouse button, in this case the operation is performed with a vertical movement of the cursor.

@mrdoob
Copy link
Owner

mrdoob commented Sep 7, 2021

Oh, I've just noticed that on ChromeOS I can pan with a trackpad using three fingers. I'll have to see if that works on MacOS.

Do you guys prefer three figers for panning instead of two fingers?

@marcofugaro
Copy link
Contributor

@mrdoob on MacOS by default three-finger pan is used to switch between fullscreen apps

Screen.Recording.2021-09-07.at.15.55.44.mov

@mrdoob
Copy link
Owner

mrdoob commented Sep 7, 2021

Indeed...

@danielefornari can we set two finger / right mouse button for pan by default?

@cignoni
Copy link
Contributor

cignoni commented Sep 7, 2021

Indeed...

@danielefornari can we set two finger / right mouse button for pan by default?

Not quite sure about these suggestions,

  1. I still prefer to leave the right mouse button to context menu (something people always expects). Pan is currently mapped on middle mouse button (that is also an old tradition for the ones old enough to remember three button mouses :D)
  2. two finger movement on trackpad is often mapped to scroll, e.g. the same behaviour of the scroll wheel, so it more 'natural' to me to map two finger up/down drag to zoom (as it is in googlemaps or sketchfab for example)

@mrdoob
Copy link
Owner

mrdoob commented Sep 8, 2021

  1. I still prefer to leave the right mouse button to context menu (something people always expects). Pan is currently mapped on middle mouse button (that is also an old tradition for the ones old enough to remember three button mouses :D)

I know what you mean about leaving the right mouse button for the context menu, but that's a battle we went through 10 years ago already and we opted for losing the context menu in favour of better single-hand 3d scene control on MacOS.

  1. two finger movement on trackpad is often mapped to scroll, e.g. the same behaviour of the scroll wheel, so it more 'natural' to me to map two finger up/down drag to zoom (as it is in googlemaps or sketchfab for example)

Sketchfab also uses right mouse button for panning:
https://sketchfab.com/3d-models/hand-painted-sketchfab-skater-girl-962a857810ff49b8a4a9b8ca71172384

@danielefornari
Copy link
Contributor Author

As suggested, mouse right button has been setted for pan operation by default and, in order to best match Orbit/Trackball controls, wheel button has been setted for zoom operation

@mrdoob
Copy link
Owner

mrdoob commented Sep 9, 2021

Works beautifully now~

@mrdoob mrdoob merged commit a403fda into mrdoob:dev Sep 9, 2021
@mrdoob
Copy link
Owner

mrdoob commented Sep 9, 2021

Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants