Browse Source

is*** should not be a getter function

Yomotsu 5 years ago
parent
commit
a53fcce912
7 changed files with 11 additions and 42 deletions
  1. 1 6
      src/math/Euler.js
  2. 1 6
      src/math/Matrix3.js
  3. 2 6
      src/math/Matrix4.js
  4. 1 6
      src/math/Quaternion.js
  5. 2 6
      src/math/Vector2.js
  6. 2 6
      src/math/Vector3.js
  7. 2 6
      src/math/Vector4.js

+ 1 - 6
src/math/Euler.js

@@ -66,12 +66,6 @@ class Euler {
 
 	}
 
-	get isEuler() {
-
-		return true;
-
-	}
-
 	set( x, y, z, order ) {
 
 		this._x = x;
@@ -326,6 +320,7 @@ class Euler {
 
 Euler.DefaultOrder = 'XYZ';
 Euler.RotationOrders = [ 'XYZ', 'YZX', 'ZXY', 'XZY', 'YXZ', 'ZYX' ];
+Euler.prototype.isEuler = true;
 
 const _matrix = new Matrix4();
 const _quaternion = new Quaternion();

+ 1 - 6
src/math/Matrix3.js

@@ -18,12 +18,6 @@ class Matrix3 {
 
 	}
 
-	get isMatrix3() {
-
-		return true;
-
-	}
-
 	set( n11, n12, n13, n21, n22, n23, n31, n32, n33 ) {
 
 		const te = this.elements;
@@ -350,5 +344,6 @@ class Matrix3 {
 
 }
 
+Matrix3.prototype.isMatrix3 = true;
 
 export { Matrix3 };

+ 2 - 6
src/math/Matrix4.js

@@ -21,12 +21,6 @@ class Matrix4 {
 
 	}
 
-	get isMatrix4() {
-
-		return true;
-
-	}
-
 	set( n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44 ) {
 
 		const te = this.elements;
@@ -873,6 +867,8 @@ class Matrix4 {
 
 }
 
+Matrix4.prototype.isMatrix4 = true;
+
 const _v1 = new Vector3();
 const _m1 = new Matrix4();
 const _zero = new Vector3( 0, 0, 0 );

+ 1 - 6
src/math/Quaternion.js

@@ -150,12 +150,6 @@ class Quaternion {
 
 	}
 
-	get isQuaternion() {
-
-		return true;
-
-	}
-
 	set( x, y, z, w ) {
 
 		this._x = x;
@@ -645,5 +639,6 @@ class Quaternion {
 
 }
 
+Quaternion.prototype.isQuaternion = true;
 
 export { Quaternion };

+ 2 - 6
src/math/Vector2.js

@@ -31,12 +31,6 @@ class Vector2 {
 
 	}
 
-	get isVector2() {
-
-		return true;
-
-	}
-
 	set( x, y ) {
 
 		this.x = x;
@@ -483,4 +477,6 @@ class Vector2 {
 
 }
 
+Vector2.prototype.isVector2 = true;
+
 export { Vector2 };

+ 2 - 6
src/math/Vector3.js

@@ -11,12 +11,6 @@ class Vector3 {
 
 	}
 
-	get isVector3() {
-
-		return true;
-
-	}
-
 	set( x, y, z ) {
 
 		if ( z === undefined ) z = this.z; // sprite.scale.set(x,y)
@@ -724,6 +718,8 @@ class Vector3 {
 
 }
 
+Vector3.prototype.isVector3 = true;
+
 const _vector = new Vector3();
 const _quaternion = new Quaternion();
 

+ 2 - 6
src/math/Vector4.js

@@ -33,12 +33,6 @@ class Vector4 {
 
 	}
 
-	get isVector4() {
-
-		return true;
-
-	}
-
 	set( x, y, z, w ) {
 
 		this.x = x;
@@ -650,4 +644,6 @@ class Vector4 {
 
 }
 
+Vector4.prototype.isVector4 = true;
+
 export { Vector4 };