|
@@ -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
|
|
// restrict theta to be between desired limits
|
|
spherical.theta = Math.max( scope.minAzimuthAngle, Math.min( scope.maxAzimuthAngle, spherical.theta ) );
|
|
spherical.theta = Math.max( scope.minAzimuthAngle, Math.min( scope.maxAzimuthAngle, spherical.theta ) );
|