소스 검색

OrbitControls: Backwards compatibility for center.

Mr.doob 9 년 전
부모
커밋
48b018387b
1개의 변경된 파일11개의 추가작업 그리고 1개의 파일을 삭제
  1. 11 1
      examples/js/controls/OrbitControls.js

+ 11 - 1
examples/js/controls/OrbitControls.js

@@ -939,6 +939,17 @@ THREE.OrbitControls.prototype.constructor = THREE.OrbitControls;
 
 Object.defineProperties( THREE.OrbitControls.prototype, {
 
+	center: {
+
+		get: function () {
+
+			console.warn( 'THREE.OrbitControls: .center has been renamed to .target' );
+			return this.target;
+
+		}
+
+	},
+
 	// backward compatibility
 
 	noZoom: {
@@ -1050,4 +1061,3 @@ Object.defineProperties( THREE.OrbitControls.prototype, {
 	}
 
 } );
-