Browse Source

OrbitControls: Backwards compatibility for center.

Mr.doob 9 years ago
parent
commit
48b018387b
1 changed files with 11 additions and 1 deletions
  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, {
 	}
 
 } );
-