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

OrbitControls: prevent aspect from affecting rotate speed #13957

Merged
merged 1 commit into from Apr 30, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 2 additions & 6 deletions examples/js/controls/OrbitControls.js
Expand Up @@ -461,10 +461,8 @@ THREE.OrbitControls = function ( object, domElement ) {

var element = scope.domElement === document ? scope.domElement.body : scope.domElement;

// rotating across whole screen goes 360 degrees around
rotateLeft( 2 * Math.PI * rotateDelta.x / element.clientWidth );
rotateLeft( 2 * Math.PI * rotateDelta.x / element.clientHeight ); // yes, height

// rotating up and down along whole screen attempts to go 360, but limited to 180
rotateUp( 2 * Math.PI * rotateDelta.y / element.clientHeight );

rotateStart.copy( rotateEnd );
Expand Down Expand Up @@ -611,10 +609,8 @@ THREE.OrbitControls = function ( object, domElement ) {

var element = scope.domElement === document ? scope.domElement.body : scope.domElement;

// rotating across whole screen goes 360 degrees around
rotateLeft( 2 * Math.PI * rotateDelta.x / element.clientWidth );
rotateLeft( 2 * Math.PI * rotateDelta.x / element.clientHeight ); // yes, height

// rotating up and down along whole screen attempts to go 360, but limited to 180
rotateUp( 2 * Math.PI * rotateDelta.y / element.clientHeight );

rotateStart.copy( rotateEnd );
Expand Down