瀏覽代碼

remove the usage of arguments in setFromMatrixColumn (#8724)

* remove usage of parameters in setFromMatrixColumn

* This fixes the usage of setFromMatrixColumn
gero3 9 年之前
父節點
當前提交
40578c9683
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. 1 1
      src/Three.Legacy.js
  2. 3 3
      src/math/Vector3.js

+ 1 - 1
src/Three.Legacy.js

@@ -188,7 +188,7 @@ Object.defineProperties( THREE.Vector3.prototype, {
 	getColumnFromMatrix: {
 		value: function ( index, matrix ) {
 			console.warn( 'THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().' );
-			return this.setFromMatrixColumn( index, matrix );
+			return this.setFromMatrixColumn( matrix, index );
 		}
 	}
 } );

+ 3 - 3
src/math/Vector3.js

@@ -706,9 +706,9 @@ THREE.Vector3.prototype = {
 		if ( typeof m === 'number' ) {
 
 			console.warn( 'THREE.Vector3: setFromMatrixColumn now expects ( matrix, index ).' );
-
-			m = arguments[ 1 ];
-			index = arguments[ 0 ];
+			var temp = m
+			m = index;
+			index = temp;
 
 		}