2
0
Эх сурвалжийг харах

fix variable name, bug pointed out by @WestLangley.

Ben Houston 9 жил өмнө
parent
commit
d650ff9f54

+ 3 - 3
examples/js/controls/OrbitControls.js

@@ -162,7 +162,7 @@ THREE.OrbitControls = function ( object, domElement ) {
 			scope.target.add( panOffset );
 
 			offset.setFromSpherical( spherical );
-			
+
 			// rotate offset back to "camera-up-vector-is-up" space
 			offset.applyQuaternion( quatInverse );
 
@@ -172,8 +172,8 @@ THREE.OrbitControls = function ( object, domElement ) {
 
 			if ( scope.enableDamping === true ) {
 
-				spherical.theta *= ( 1 - scope.dampingFactor );
-				spherical.phi *= ( 1 - scope.dampingFactor );
+				sphericalDelta.theta *= ( 1 - scope.dampingFactor );
+				sphericalDelta.phi *= ( 1 - scope.dampingFactor );
 
 			} else {