-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Additional interactive camera controls #28
Comments
Hi Oliver, thanks, great to hear you like it! Regarding the camera modes, check this issue for solving it, it's still undocumented, would be nice to have a function in the pylab module for this, with an api similar to mayavi or matplotlib (if they have this). cheers, Maarten |
Maarten, Yes, camera_control = 'orbit' is just what I was looking for. Although it maintains the y-axis as vertical as opposed to the z-axis. I like the idea of zooming to the mouse, but I think it would actually be complemented quite well by panning. Imagine that you've zoomed in, but you're slightly off-centered. Then without panning, you have to zoom back out and try to zoom in with more accuracy. Why do you suggest zooming to the object under the cursor instead of the cursor itself? I'm imagining that would be confusing to a user trying to zoom to a part of a large object which is not near it's center of mass. Cheers, |
True, I think they are complemantary, but I think there is less requirements for panning of zoom to the mouse position would work. The camera controls are listed here:
They are currently used in figure.js. If you want to change the constraining behaviour, I think you should change what is the 'up' direction. There is support for panning, but it is using the keyboard I think. Also, I'm thinking about what we should define as the z axis, now I'm using OpenGL's default, which is z negative points away from the camera, into the screen, but most people prefer pointing it up. Ideas on that are welcome. |
As a mathematician, my vote definitely goes to +z = up. Changing ( 0, 1, 0 ) to ( 0, 0, 1) on line 120 of OrbitControls.js definitely changes the rotation constraints appropriately, but it also messes up the rotation control. Somehow, it seems like the cursor interaction is still assuming the other 'up' orientation. I'll have to search around this file to figure out what else would have to change to make up for this. As for panning, it looks like everything is in place in OrbitControls.js which should allow for panning, yet it doensn't seem possible. Do you know what the keyboard bindings should be? |
Yes, I think we should change it to z up. Panning was disabled here: |
Leaving this issue open for the panning as feature. |
Here's a PR for this feature: #273. @OliverEvans96 Would this work for you? |
Hello!
Thanks for the awesome package! The work you've done is incredible. I have two camera-related feature requests. Perhaps they're already implemented and I haven't found them yet.
The first is panning. For example, shift-LMB & drag to pan? This is a pretty standard feature in 3d viewers which would be very handy.
Second is "turntable rotation" where the z axis is constrained to be pointing up. More info: https://blender.stackexchange.com/questions/657/what-is-the-difference-between-the-trackball-and-turntable-style-view-modes
Turntable is well implemented in plotly: https://help.plot.ly/getting-to-know-the-plotly-modebar/#3d-charts
I'd be happy to help work on this if you point me in the right direction.
Thanks,
Oliver
The text was updated successfully, but these errors were encountered: