Переглянути джерело

moved matrix4.getPosition to legacy

looeee 8 роки тому
батько
коміт
de18c8a799
2 змінених файлів з 11 додано та 15 видалено
  1. 11 0
      src/Three.Legacy.js
  2. 0 15
      src/math/Matrix4.js

+ 11 - 0
src/Three.Legacy.js

@@ -282,6 +282,17 @@ Object.assign( Matrix4.prototype, {
 
 		return this.toArray( array, offset );
 	},
+	getPosition: function () {
+
+		var v1;
+
+		return function getPosition() {
+			if ( v1 === undefined ) v1 = new Vector3();
+			console.warn( 'THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.' );
+			return v1.setFromMatrixColumn( this, 3 );
+		};
+
+	}(),
 	setRotationFromQuaternion: function ( q ) {
 		console.warn( 'THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().' );
 		return this.makeRotationFromQuaternion( q );

+ 0 - 15
src/math/Matrix4.js

@@ -567,21 +567,6 @@ Matrix4.prototype = {
 
 	},
 
-	getPosition: function () {
-
-		var v1;
-
-		return function getPosition() {
-
-			if ( v1 === undefined ) v1 = new Vector3();
-			console.warn( 'THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.' );
-
-			return v1.setFromMatrixColumn( this, 3 );
-
-		};
-
-	}(),
-
 	setPosition: function ( v ) {
 
 		var te = this.elements;