Skip to content

Commit a53fcce

Browse files
committed
is*** should not be a getter function
1 parent 027a6b1 commit a53fcce

File tree

7 files changed

+11
-42
lines changed

7 files changed

+11
-42
lines changed

src/math/Euler.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@ class Euler {
6666

6767
}
6868

69-
get isEuler() {
70-
71-
return true;
72-
73-
}
74-
7569
set( x, y, z, order ) {
7670

7771
this._x = x;
@@ -326,6 +320,7 @@ class Euler {
326320

327321
Euler.DefaultOrder = 'XYZ';
328322
Euler.RotationOrders = [ 'XYZ', 'YZX', 'ZXY', 'XZY', 'YXZ', 'ZYX' ];
323+
Euler.prototype.isEuler = true;
329324

330325
const _matrix = new Matrix4();
331326
const _quaternion = new Quaternion();

src/math/Matrix3.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ class Matrix3 {
1818

1919
}
2020

21-
get isMatrix3() {
22-
23-
return true;
24-
25-
}
26-
2721
set( n11, n12, n13, n21, n22, n23, n31, n32, n33 ) {
2822

2923
const te = this.elements;
@@ -350,5 +344,6 @@ class Matrix3 {
350344

351345
}
352346

347+
Matrix3.prototype.isMatrix3 = true;
353348

354349
export { Matrix3 };

src/math/Matrix4.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ class Matrix4 {
2121

2222
}
2323

24-
get isMatrix4() {
25-
26-
return true;
27-
28-
}
29-
3024
set( n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44 ) {
3125

3226
const te = this.elements;
@@ -873,6 +867,8 @@ class Matrix4 {
873867

874868
}
875869

870+
Matrix4.prototype.isMatrix4 = true;
871+
876872
const _v1 = new Vector3();
877873
const _m1 = new Matrix4();
878874
const _zero = new Vector3( 0, 0, 0 );

src/math/Quaternion.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,6 @@ class Quaternion {
150150

151151
}
152152

153-
get isQuaternion() {
154-
155-
return true;
156-
157-
}
158-
159153
set( x, y, z, w ) {
160154

161155
this._x = x;
@@ -645,5 +639,6 @@ class Quaternion {
645639

646640
}
647641

642+
Quaternion.prototype.isQuaternion = true;
648643

649644
export { Quaternion };

src/math/Vector2.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@ class Vector2 {
3131

3232
}
3333

34-
get isVector2() {
35-
36-
return true;
37-
38-
}
39-
4034
set( x, y ) {
4135

4236
this.x = x;
@@ -483,4 +477,6 @@ class Vector2 {
483477

484478
}
485479

480+
Vector2.prototype.isVector2 = true;
481+
486482
export { Vector2 };

src/math/Vector3.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@ class Vector3 {
1111

1212
}
1313

14-
get isVector3() {
15-
16-
return true;
17-
18-
}
19-
2014
set( x, y, z ) {
2115

2216
if ( z === undefined ) z = this.z; // sprite.scale.set(x,y)
@@ -724,6 +718,8 @@ class Vector3 {
724718

725719
}
726720

721+
Vector3.prototype.isVector3 = true;
722+
727723
const _vector = new Vector3();
728724
const _quaternion = new Quaternion();
729725

src/math/Vector4.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,6 @@ class Vector4 {
3333

3434
}
3535

36-
get isVector4() {
37-
38-
return true;
39-
40-
}
41-
4236
set( x, y, z, w ) {
4337

4438
this.x = x;
@@ -650,4 +644,6 @@ class Vector4 {
650644

651645
}
652646

647+
Vector4.prototype.isVector4 = true;
648+
653649
export { Vector4 };

0 commit comments

Comments
 (0)