OrbitControls should support Ctrl-drag (etc.)
See original GitHub issueDescription of the problem
WebKit is making use of OrbitControls for a visualization in Web Inspector, and we realized that it would be convenient—particularly with a trackpad—if one could pan with Ctrl-drag as an alternative to right-drag.
I don’t know whether people would be receptive to this as default behavior, but if not, it would still be great if we could build upon mouseButtons
such that consumers can make this configuration from the outside.
Either way, as long as the functionality is desired, I’d be happy to submit a PR. 😄
Three.js version
- r92
Browser
- All of them
OS
- All of them
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Add Controls in ThreeJs | OrbitControls in ThreeJs - YouTube
Controlling objects in ThreeJs is a pretty important topic so by doing that we can create a pretty good interactive 3D view, ...
Read more >OrbitControls – three.js docs
Orbit controls allow the camera to orbit around a target. To use this, as with all files in the /examples directory, you will...
Read more >Point Drag Controls for Three.js - virtual.blue
Drag controller for Three.js allowing translation and rotation of individual objects around the clicked point. Supports touch. Works with OrbitControls.js.
Read more >Three.js Rendering on Demand
First we'll add in the OrbitControls so there is something that could ... The one above snaps when you press an arrow key...
Read more >Navigating 3D Models and Animations - Knowledge Base
Models with animation are only supported on the Enterprise and Educ. ... You can drag from the center of the four-way control out...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sure. It should be backwards-compatible. This is an easy change. Hopefully you can propose an elegant implementation.
Please note that the change in #13972 is more flexible than @WestLangley’s code snippet above, allowing one to freely specify whether a given mousedown event qualifies as an
ORBIT
/ZOOM
/PAN
action.Seems like there’s a worthwhile discussion to be had surrounding support for alternate pointer devices, but I’m pretty sure it’s outside the scope of this issue and its corresponding PR…?