Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions examples/js/controls/OrbitControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,17 @@ THREE.OrbitControls = function ( object, domElement ) {

}

spherical.theta += sphericalDelta.theta;
spherical.phi += sphericalDelta.phi;
if ( scope.enableDamping ) {

spherical.theta += sphericalDelta.theta * scope.dampingFactor;
spherical.phi += sphericalDelta.phi * scope.dampingFactor;

} else {

spherical.theta += sphericalDelta.theta;
spherical.phi += sphericalDelta.phi;

}

// restrict theta to be between desired limits
spherical.theta = Math.max( scope.minAzimuthAngle, Math.min( scope.maxAzimuthAngle, spherical.theta ) );
Expand Down
13 changes: 11 additions & 2 deletions examples/jsm/controls/OrbitControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,17 @@ var OrbitControls = function ( object, domElement ) {

}

spherical.theta += sphericalDelta.theta;
spherical.phi += sphericalDelta.phi;
if ( scope.enableDamping ) {

spherical.theta += sphericalDelta.theta * scope.dampingFactor;
spherical.phi += sphericalDelta.phi * scope.dampingFactor;

} else {

spherical.theta += sphericalDelta.theta;
spherical.phi += sphericalDelta.phi;

}

// restrict theta to be between desired limits
spherical.theta = Math.max( scope.minAzimuthAngle, Math.min( scope.maxAzimuthAngle, spherical.theta ) );
Expand Down