소스 검색

fix variable name, bug pointed out by @WestLangley.

Ben Houston 9 년 전
부모
커밋
d650ff9f54
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      examples/js/controls/OrbitControls.js

+ 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 {