|
@@ -182,7 +182,16 @@ THREE.OrbitControls = function ( object, domElement ) {
|
|
|
spherical.radius = Math.max( scope.minDistance, Math.min( scope.maxDistance, spherical.radius ) );
|
|
|
|
|
|
// move target to panned location
|
|
|
- scope.target.add( panOffset );
|
|
|
+
|
|
|
+ if ( scope.enableDamping === true ) {
|
|
|
+
|
|
|
+ scope.target.addScaledVector( panOffset, scope.dampingFactor );
|
|
|
+
|
|
|
+ } else {
|
|
|
+
|
|
|
+ scope.target.add( panOffset );
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
offset.setFromSpherical( spherical );
|
|
|
|