question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OrbitControls should support Ctrl-drag (etc.)

See original GitHub issue
Description 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:closed
  • Created 5 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
WestLangleycommented, Apr 30, 2018

Sure. It should be backwards-compatible. This is an easy change. Hopefully you can propose an elegant implementation.

0reactions
rkirslingcommented, May 2, 2018

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…?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found