瀏覽代碼

remove Matrix4.makeShear per @WestLangley here: https://github.com/mrdoob/three.js/pull/5788#issuecomment-67852744

Ben Houston 10 年之前
父節點
當前提交
6e77ef510a
共有 2 個文件被更改,包括 0 次插入34 次删除
  1. 0 20
      src/math/Matrix4.js
  2. 0 14
      test/unit/math/Matrix4.js

+ 0 - 20
src/math/Matrix4.js

@@ -146,26 +146,6 @@ THREE.Matrix4.prototype = {
 
 
 	}(),
 	}(),
 
 
-	makeShear: function ( s, reverseStyle ) {
-
-		// Maya style
-		this.set(
-			1,  s.x, s.y, 0,
-			0,  1,   s.z, 0,
-			0,  0,   1,   0,
-			0,  0,   0,   1
-		);
-
-		if ( reverseStyle ) {
-
-		 	this.transpose();
-
-		}
-
-	    return this;
-
-	},
-
 	makeRotationFromEuler: function ( euler ) {
 	makeRotationFromEuler: function ( euler ) {
 
 
 		if ( euler instanceof THREE.Euler === false ) {
 		if ( euler instanceof THREE.Euler === false ) {

+ 0 - 14
test/unit/math/Matrix4.js

@@ -211,20 +211,6 @@ test( "getInverse", function() {
 	}
 	}
 });
 });
 
 
-test( "makeShear", function() {
-	var a = new THREE.Matrix4();
-	var b = new THREE.Matrix4();
-	var shear = new THREE.Vector3( 1, 2, 3 );
-	a.makeShear( shear )
-	// ensure it isn't identity
-	ok( ! matrixEquals4( a, b ), "Passed!" ); 
-	b.makeShear( shear, true );
-	var c = a.clone().transpose();
-	// ensure that one is transpose of the other
-	ok( matrixEquals4( b, c ), "Passed!" );
-	// TODO: Think of better tests for shear
-});
-
 test( "makeBasis/extractBasis", function() {
 test( "makeBasis/extractBasis", function() {
 	var identityBasis = [ new THREE.Vector3( 1, 0, 0 ), new THREE.Vector3( 0, 1, 0 ), new THREE.Vector3( 0, 0, 1 ) ];
 	var identityBasis = [ new THREE.Vector3( 1, 0, 0 ), new THREE.Vector3( 0, 1, 0 ), new THREE.Vector3( 0, 0, 1 ) ];
 	var a = new THREE.Matrix4().makeBasis( identityBasis[0], identityBasis[1], identityBasis[2] );
 	var a = new THREE.Matrix4().makeBasis( identityBasis[0], identityBasis[1], identityBasis[2] );