@galacean/engine-math 1.0.0-alpha.6 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,19 +33,21 @@ Object.defineProperty(exports, '__esModule', { value: true });
33
33
  })(exports.FrustumFace || (exports.FrustumFace = {}));
34
34
 
35
35
  function _defineProperties(target, props) {
36
- for (var i = 0; i < props.length; i++) {
37
- var descriptor = props[i];
38
- descriptor.enumerable = descriptor.enumerable || false;
39
- descriptor.configurable = true;
40
- if ("value" in descriptor) descriptor.writable = true;
41
- Object.defineProperty(target, descriptor.key, descriptor);
42
- }
36
+ for (var i = 0; i < props.length; i++) {
37
+ var descriptor = props[i];
38
+ descriptor.enumerable = descriptor.enumerable || false;
39
+ descriptor.configurable = true;
40
+
41
+ if ("value" in descriptor) descriptor.writable = true;
42
+
43
+ Object.defineProperty(target, descriptor.key, descriptor);
44
+ }
43
45
  }
46
+ function _create_class(Constructor, protoProps, staticProps) {
47
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
48
+ if (staticProps) _defineProperties(Constructor, staticProps);
44
49
 
45
- function _createClass(Constructor, protoProps, staticProps) {
46
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
47
- if (staticProps) _defineProperties(Constructor, staticProps);
48
- return Constructor;
50
+ return Constructor;
49
51
  }
50
52
 
51
53
  /**
@@ -93,9 +95,15 @@ function _createClass(Constructor, protoProps, staticProps) {
93
95
  };
94
96
  return MathUtil;
95
97
  }();
96
- /** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
97
- /** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
98
- /** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
98
+ (function() {
99
+ /** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
100
+ })();
101
+ (function() {
102
+ /** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
103
+ })();
104
+ (function() {
105
+ /** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
106
+ })();
99
107
 
100
108
  /**
101
109
  * Describes a 3D-vector.
@@ -554,7 +562,7 @@ function _createClass(Constructor, protoProps, staticProps) {
554
562
  out._z = iz * qw - iw * qz - ix * qy + iy * qx;
555
563
  out._onValueChanged && out._onValueChanged();
556
564
  };
557
- _createClass(Vector3, [
565
+ _create_class(Vector3, [
558
566
  {
559
567
  key: "x",
560
568
  get: /**
@@ -594,8 +602,12 @@ function _createClass(Constructor, protoProps, staticProps) {
594
602
  ]);
595
603
  return Vector3;
596
604
  }();
597
- /** @internal */ Vector3._zero = new Vector3(0.0, 0.0, 0.0);
598
- /** @internal */ Vector3._one = new Vector3(1.0, 1.0, 1.0);
605
+ (function() {
606
+ /** @internal */ Vector3._zero = new Vector3(0.0, 0.0, 0.0);
607
+ })();
608
+ (function() {
609
+ /** @internal */ Vector3._one = new Vector3(1.0, 1.0, 1.0);
610
+ })();
599
611
 
600
612
  /**
601
613
  * A bounding sphere.
@@ -664,7 +676,9 @@ function _createClass(Constructor, protoProps, staticProps) {
664
676
  };
665
677
  return BoundingSphere;
666
678
  }();
667
- BoundingSphere._tempVec30 = new Vector3();
679
+ (function() {
680
+ BoundingSphere._tempVec30 = new Vector3();
681
+ })();
668
682
 
669
683
  /**
670
684
  * Axis Aligned Bound Box (AABB).
@@ -823,8 +837,12 @@ BoundingSphere._tempVec30 = new Vector3();
823
837
  };
824
838
  return BoundingBox;
825
839
  }();
826
- BoundingBox._tempVec30 = new Vector3();
827
- BoundingBox._tempVec31 = new Vector3();
840
+ (function() {
841
+ BoundingBox._tempVec30 = new Vector3();
842
+ })();
843
+ (function() {
844
+ BoundingBox._tempVec31 = new Vector3();
845
+ })();
828
846
 
829
847
  /**
830
848
  * Contains static methods to help in determining intersections, containment, etc.
@@ -1110,50 +1128,6 @@ BoundingBox._tempVec31 = new Vector3();
1110
1128
  return true;
1111
1129
  };
1112
1130
  /**
1113
- * Get the containment type between a frustum and a point.
1114
- * @param frustum - The frustum
1115
- * @param point - The point
1116
- * @returns The containment type
1117
- */ CollisionUtil.frustumContainsPoint = function frustumContainsPoint(frustum, point) {
1118
- var distance = CollisionUtil.distancePlaneAndPoint(frustum.near, point);
1119
- if (Math.abs(distance) < MathUtil.zeroTolerance) {
1120
- return exports.ContainmentType.Intersects;
1121
- } else if (distance < 0) {
1122
- return exports.ContainmentType.Disjoint;
1123
- }
1124
- distance = CollisionUtil.distancePlaneAndPoint(frustum.far, point);
1125
- if (Math.abs(distance) < MathUtil.zeroTolerance) {
1126
- return exports.ContainmentType.Intersects;
1127
- } else if (distance < 0) {
1128
- return exports.ContainmentType.Disjoint;
1129
- }
1130
- distance = CollisionUtil.distancePlaneAndPoint(frustum.left, point);
1131
- if (Math.abs(distance) < MathUtil.zeroTolerance) {
1132
- return exports.ContainmentType.Intersects;
1133
- } else if (distance < 0) {
1134
- return exports.ContainmentType.Disjoint;
1135
- }
1136
- distance = CollisionUtil.distancePlaneAndPoint(frustum.right, point);
1137
- if (Math.abs(distance) < MathUtil.zeroTolerance) {
1138
- return exports.ContainmentType.Intersects;
1139
- } else if (distance < 0) {
1140
- return exports.ContainmentType.Disjoint;
1141
- }
1142
- distance = CollisionUtil.distancePlaneAndPoint(frustum.top, point);
1143
- if (Math.abs(distance) < MathUtil.zeroTolerance) {
1144
- return exports.ContainmentType.Intersects;
1145
- } else if (distance < 0) {
1146
- return exports.ContainmentType.Disjoint;
1147
- }
1148
- distance = CollisionUtil.distancePlaneAndPoint(frustum.bottom, point);
1149
- if (Math.abs(distance) < MathUtil.zeroTolerance) {
1150
- return exports.ContainmentType.Intersects;
1151
- } else if (distance < 0) {
1152
- return exports.ContainmentType.Disjoint;
1153
- }
1154
- return exports.ContainmentType.Contains;
1155
- };
1156
- /**
1157
1131
  * Get the containment type between a frustum and a box (AABB).
1158
1132
  * @param frustum - The frustum
1159
1133
  * @param box - The box
@@ -1217,9 +1191,15 @@ BoundingBox._tempVec31 = new Vector3();
1217
1191
  };
1218
1192
  return CollisionUtil;
1219
1193
  }();
1220
- CollisionUtil._tempVec30 = new Vector3();
1221
- CollisionUtil._tempVec31 = new Vector3();
1222
- CollisionUtil._tempVec32 = new Vector3();
1194
+ (function() {
1195
+ CollisionUtil._tempVec30 = new Vector3();
1196
+ })();
1197
+ (function() {
1198
+ CollisionUtil._tempVec31 = new Vector3();
1199
+ })();
1200
+ (function() {
1201
+ CollisionUtil._tempVec32 = new Vector3();
1202
+ })();
1223
1203
 
1224
1204
  /**
1225
1205
  * Represents a plane in three-dimensional space.
@@ -2543,7 +2523,7 @@ CollisionUtil._tempVec32 = new Vector3();
2543
2523
  out._w = a._w * s;
2544
2524
  out._onValueChanged && out._onValueChanged();
2545
2525
  };
2546
- _createClass(Quaternion, [
2526
+ _create_class(Quaternion, [
2547
2527
  {
2548
2528
  key: "x",
2549
2529
  get: /**
@@ -2603,8 +2583,12 @@ CollisionUtil._tempVec32 = new Vector3();
2603
2583
  ]);
2604
2584
  return Quaternion;
2605
2585
  }();
2606
- /** @internal */ Quaternion._tempVector3 = new Vector3();
2607
- /** @internal */ Quaternion._tempQuat1 = new Quaternion();
2586
+ (function() {
2587
+ /** @internal */ Quaternion._tempVector3 = new Vector3();
2588
+ })();
2589
+ (function() {
2590
+ /** @internal */ Quaternion._tempQuat1 = new Quaternion();
2591
+ })();
2608
2592
 
2609
2593
  /**
2610
2594
  * Represents a 4x4 mathematical matrix.
@@ -3550,11 +3534,21 @@ CollisionUtil._tempVec32 = new Vector3();
3550
3534
  };
3551
3535
  return Matrix;
3552
3536
  }();
3553
- Matrix._tempVec30 = new Vector3();
3554
- Matrix._tempVec31 = new Vector3();
3555
- Matrix._tempVec32 = new Vector3();
3556
- Matrix._tempMat30 = new Matrix3x3();
3557
- /** @internal Identity matrix. */ Matrix._identity = new Matrix(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0);
3537
+ (function() {
3538
+ Matrix._tempVec30 = new Vector3();
3539
+ })();
3540
+ (function() {
3541
+ Matrix._tempVec31 = new Vector3();
3542
+ })();
3543
+ (function() {
3544
+ Matrix._tempVec32 = new Vector3();
3545
+ })();
3546
+ (function() {
3547
+ Matrix._tempMat30 = new Matrix3x3();
3548
+ })();
3549
+ (function() {
3550
+ /** @internal Identity matrix. */ Matrix._identity = new Matrix(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0);
3551
+ })();
3558
3552
 
3559
3553
  /**
3560
3554
  * Represents a ray with an origin and a direction in 3D space.
@@ -3890,7 +3884,7 @@ Matrix._tempMat30 = new Matrix3x3();
3890
3884
  out._y = left._y * s;
3891
3885
  out._onValueChanged && out._onValueChanged();
3892
3886
  };
3893
- _createClass(Vector2, [
3887
+ _create_class(Vector2, [
3894
3888
  {
3895
3889
  key: "x",
3896
3890
  get: /**
@@ -3918,8 +3912,12 @@ Matrix._tempMat30 = new Matrix3x3();
3918
3912
  ]);
3919
3913
  return Vector2;
3920
3914
  }();
3921
- /** @internal */ Vector2._zero = new Vector2(0.0, 0.0);
3922
- /** @internal */ Vector2._one = new Vector2(1.0, 1.0);
3915
+ (function() {
3916
+ /** @internal */ Vector2._zero = new Vector2(0.0, 0.0);
3917
+ })();
3918
+ (function() {
3919
+ /** @internal */ Vector2._one = new Vector2(1.0, 1.0);
3920
+ })();
3923
3921
 
3924
3922
  /**
3925
3923
  * Describes a 4D-vector.
@@ -4300,7 +4298,7 @@ Matrix._tempMat30 = new Matrix3x3();
4300
4298
  out._w = w;
4301
4299
  out._onValueChanged && out._onValueChanged();
4302
4300
  };
4303
- _createClass(Vector4, [
4301
+ _create_class(Vector4, [
4304
4302
  {
4305
4303
  key: "x",
4306
4304
  get: /**
@@ -4352,8 +4350,12 @@ Matrix._tempMat30 = new Matrix3x3();
4352
4350
  ]);
4353
4351
  return Vector4;
4354
4352
  }();
4355
- /** @internal */ Vector4._zero = new Vector4(0.0, 0.0, 0.0, 0.0);
4356
- /** @internal */ Vector4._one = new Vector4(1.0, 1.0, 1.0, 1.0);
4353
+ (function() {
4354
+ /** @internal */ Vector4._zero = new Vector4(0.0, 0.0, 0.0, 0.0);
4355
+ })();
4356
+ (function() {
4357
+ /** @internal */ Vector4._one = new Vector4(1.0, 1.0, 1.0, 1.0);
4358
+ })();
4357
4359
 
4358
4360
  /**
4359
4361
  * Describes a color in the from of RGBA (in order: R, G, B, A).
@@ -4563,7 +4565,7 @@ Matrix._tempMat30 = new Matrix3x3();
4563
4565
  out._onValueChanged && out._onValueChanged();
4564
4566
  return out;
4565
4567
  };
4566
- _createClass(Color, [
4568
+ _create_class(Color, [
4567
4569
  {
4568
4570
  key: "r",
4569
4571
  get: /**
package/dist/module.js CHANGED
@@ -29,19 +29,21 @@
29
29
  })(FrustumFace || (FrustumFace = {}));
30
30
 
31
31
  function _defineProperties(target, props) {
32
- for (var i = 0; i < props.length; i++) {
33
- var descriptor = props[i];
34
- descriptor.enumerable = descriptor.enumerable || false;
35
- descriptor.configurable = true;
36
- if ("value" in descriptor) descriptor.writable = true;
37
- Object.defineProperty(target, descriptor.key, descriptor);
38
- }
32
+ for (var i = 0; i < props.length; i++) {
33
+ var descriptor = props[i];
34
+ descriptor.enumerable = descriptor.enumerable || false;
35
+ descriptor.configurable = true;
36
+
37
+ if ("value" in descriptor) descriptor.writable = true;
38
+
39
+ Object.defineProperty(target, descriptor.key, descriptor);
40
+ }
39
41
  }
42
+ function _create_class(Constructor, protoProps, staticProps) {
43
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
44
+ if (staticProps) _defineProperties(Constructor, staticProps);
40
45
 
41
- function _createClass(Constructor, protoProps, staticProps) {
42
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
43
- if (staticProps) _defineProperties(Constructor, staticProps);
44
- return Constructor;
46
+ return Constructor;
45
47
  }
46
48
 
47
49
  /**
@@ -89,9 +91,15 @@ function _createClass(Constructor, protoProps, staticProps) {
89
91
  };
90
92
  return MathUtil;
91
93
  }();
92
- /** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
93
- /** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
94
- /** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
94
+ (function() {
95
+ /** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
96
+ })();
97
+ (function() {
98
+ /** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
99
+ })();
100
+ (function() {
101
+ /** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
102
+ })();
95
103
 
96
104
  /**
97
105
  * Describes a 3D-vector.
@@ -550,7 +558,7 @@ function _createClass(Constructor, protoProps, staticProps) {
550
558
  out._z = iz * qw - iw * qz - ix * qy + iy * qx;
551
559
  out._onValueChanged && out._onValueChanged();
552
560
  };
553
- _createClass(Vector3, [
561
+ _create_class(Vector3, [
554
562
  {
555
563
  key: "x",
556
564
  get: /**
@@ -590,8 +598,12 @@ function _createClass(Constructor, protoProps, staticProps) {
590
598
  ]);
591
599
  return Vector3;
592
600
  }();
593
- /** @internal */ Vector3._zero = new Vector3(0.0, 0.0, 0.0);
594
- /** @internal */ Vector3._one = new Vector3(1.0, 1.0, 1.0);
601
+ (function() {
602
+ /** @internal */ Vector3._zero = new Vector3(0.0, 0.0, 0.0);
603
+ })();
604
+ (function() {
605
+ /** @internal */ Vector3._one = new Vector3(1.0, 1.0, 1.0);
606
+ })();
595
607
 
596
608
  /**
597
609
  * A bounding sphere.
@@ -660,7 +672,9 @@ function _createClass(Constructor, protoProps, staticProps) {
660
672
  };
661
673
  return BoundingSphere;
662
674
  }();
663
- BoundingSphere._tempVec30 = new Vector3();
675
+ (function() {
676
+ BoundingSphere._tempVec30 = new Vector3();
677
+ })();
664
678
 
665
679
  /**
666
680
  * Axis Aligned Bound Box (AABB).
@@ -819,8 +833,12 @@ BoundingSphere._tempVec30 = new Vector3();
819
833
  };
820
834
  return BoundingBox;
821
835
  }();
822
- BoundingBox._tempVec30 = new Vector3();
823
- BoundingBox._tempVec31 = new Vector3();
836
+ (function() {
837
+ BoundingBox._tempVec30 = new Vector3();
838
+ })();
839
+ (function() {
840
+ BoundingBox._tempVec31 = new Vector3();
841
+ })();
824
842
 
825
843
  /**
826
844
  * Contains static methods to help in determining intersections, containment, etc.
@@ -1106,50 +1124,6 @@ BoundingBox._tempVec31 = new Vector3();
1106
1124
  return true;
1107
1125
  };
1108
1126
  /**
1109
- * Get the containment type between a frustum and a point.
1110
- * @param frustum - The frustum
1111
- * @param point - The point
1112
- * @returns The containment type
1113
- */ CollisionUtil.frustumContainsPoint = function frustumContainsPoint(frustum, point) {
1114
- var distance = CollisionUtil.distancePlaneAndPoint(frustum.near, point);
1115
- if (Math.abs(distance) < MathUtil.zeroTolerance) {
1116
- return ContainmentType.Intersects;
1117
- } else if (distance < 0) {
1118
- return ContainmentType.Disjoint;
1119
- }
1120
- distance = CollisionUtil.distancePlaneAndPoint(frustum.far, point);
1121
- if (Math.abs(distance) < MathUtil.zeroTolerance) {
1122
- return ContainmentType.Intersects;
1123
- } else if (distance < 0) {
1124
- return ContainmentType.Disjoint;
1125
- }
1126
- distance = CollisionUtil.distancePlaneAndPoint(frustum.left, point);
1127
- if (Math.abs(distance) < MathUtil.zeroTolerance) {
1128
- return ContainmentType.Intersects;
1129
- } else if (distance < 0) {
1130
- return ContainmentType.Disjoint;
1131
- }
1132
- distance = CollisionUtil.distancePlaneAndPoint(frustum.right, point);
1133
- if (Math.abs(distance) < MathUtil.zeroTolerance) {
1134
- return ContainmentType.Intersects;
1135
- } else if (distance < 0) {
1136
- return ContainmentType.Disjoint;
1137
- }
1138
- distance = CollisionUtil.distancePlaneAndPoint(frustum.top, point);
1139
- if (Math.abs(distance) < MathUtil.zeroTolerance) {
1140
- return ContainmentType.Intersects;
1141
- } else if (distance < 0) {
1142
- return ContainmentType.Disjoint;
1143
- }
1144
- distance = CollisionUtil.distancePlaneAndPoint(frustum.bottom, point);
1145
- if (Math.abs(distance) < MathUtil.zeroTolerance) {
1146
- return ContainmentType.Intersects;
1147
- } else if (distance < 0) {
1148
- return ContainmentType.Disjoint;
1149
- }
1150
- return ContainmentType.Contains;
1151
- };
1152
- /**
1153
1127
  * Get the containment type between a frustum and a box (AABB).
1154
1128
  * @param frustum - The frustum
1155
1129
  * @param box - The box
@@ -1213,9 +1187,15 @@ BoundingBox._tempVec31 = new Vector3();
1213
1187
  };
1214
1188
  return CollisionUtil;
1215
1189
  }();
1216
- CollisionUtil._tempVec30 = new Vector3();
1217
- CollisionUtil._tempVec31 = new Vector3();
1218
- CollisionUtil._tempVec32 = new Vector3();
1190
+ (function() {
1191
+ CollisionUtil._tempVec30 = new Vector3();
1192
+ })();
1193
+ (function() {
1194
+ CollisionUtil._tempVec31 = new Vector3();
1195
+ })();
1196
+ (function() {
1197
+ CollisionUtil._tempVec32 = new Vector3();
1198
+ })();
1219
1199
 
1220
1200
  /**
1221
1201
  * Represents a plane in three-dimensional space.
@@ -2539,7 +2519,7 @@ CollisionUtil._tempVec32 = new Vector3();
2539
2519
  out._w = a._w * s;
2540
2520
  out._onValueChanged && out._onValueChanged();
2541
2521
  };
2542
- _createClass(Quaternion, [
2522
+ _create_class(Quaternion, [
2543
2523
  {
2544
2524
  key: "x",
2545
2525
  get: /**
@@ -2599,8 +2579,12 @@ CollisionUtil._tempVec32 = new Vector3();
2599
2579
  ]);
2600
2580
  return Quaternion;
2601
2581
  }();
2602
- /** @internal */ Quaternion._tempVector3 = new Vector3();
2603
- /** @internal */ Quaternion._tempQuat1 = new Quaternion();
2582
+ (function() {
2583
+ /** @internal */ Quaternion._tempVector3 = new Vector3();
2584
+ })();
2585
+ (function() {
2586
+ /** @internal */ Quaternion._tempQuat1 = new Quaternion();
2587
+ })();
2604
2588
 
2605
2589
  /**
2606
2590
  * Represents a 4x4 mathematical matrix.
@@ -3546,11 +3530,21 @@ CollisionUtil._tempVec32 = new Vector3();
3546
3530
  };
3547
3531
  return Matrix;
3548
3532
  }();
3549
- Matrix._tempVec30 = new Vector3();
3550
- Matrix._tempVec31 = new Vector3();
3551
- Matrix._tempVec32 = new Vector3();
3552
- Matrix._tempMat30 = new Matrix3x3();
3553
- /** @internal Identity matrix. */ Matrix._identity = new Matrix(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0);
3533
+ (function() {
3534
+ Matrix._tempVec30 = new Vector3();
3535
+ })();
3536
+ (function() {
3537
+ Matrix._tempVec31 = new Vector3();
3538
+ })();
3539
+ (function() {
3540
+ Matrix._tempVec32 = new Vector3();
3541
+ })();
3542
+ (function() {
3543
+ Matrix._tempMat30 = new Matrix3x3();
3544
+ })();
3545
+ (function() {
3546
+ /** @internal Identity matrix. */ Matrix._identity = new Matrix(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0);
3547
+ })();
3554
3548
 
3555
3549
  /**
3556
3550
  * Represents a ray with an origin and a direction in 3D space.
@@ -3886,7 +3880,7 @@ Matrix._tempMat30 = new Matrix3x3();
3886
3880
  out._y = left._y * s;
3887
3881
  out._onValueChanged && out._onValueChanged();
3888
3882
  };
3889
- _createClass(Vector2, [
3883
+ _create_class(Vector2, [
3890
3884
  {
3891
3885
  key: "x",
3892
3886
  get: /**
@@ -3914,8 +3908,12 @@ Matrix._tempMat30 = new Matrix3x3();
3914
3908
  ]);
3915
3909
  return Vector2;
3916
3910
  }();
3917
- /** @internal */ Vector2._zero = new Vector2(0.0, 0.0);
3918
- /** @internal */ Vector2._one = new Vector2(1.0, 1.0);
3911
+ (function() {
3912
+ /** @internal */ Vector2._zero = new Vector2(0.0, 0.0);
3913
+ })();
3914
+ (function() {
3915
+ /** @internal */ Vector2._one = new Vector2(1.0, 1.0);
3916
+ })();
3919
3917
 
3920
3918
  /**
3921
3919
  * Describes a 4D-vector.
@@ -4296,7 +4294,7 @@ Matrix._tempMat30 = new Matrix3x3();
4296
4294
  out._w = w;
4297
4295
  out._onValueChanged && out._onValueChanged();
4298
4296
  };
4299
- _createClass(Vector4, [
4297
+ _create_class(Vector4, [
4300
4298
  {
4301
4299
  key: "x",
4302
4300
  get: /**
@@ -4348,8 +4346,12 @@ Matrix._tempMat30 = new Matrix3x3();
4348
4346
  ]);
4349
4347
  return Vector4;
4350
4348
  }();
4351
- /** @internal */ Vector4._zero = new Vector4(0.0, 0.0, 0.0, 0.0);
4352
- /** @internal */ Vector4._one = new Vector4(1.0, 1.0, 1.0, 1.0);
4349
+ (function() {
4350
+ /** @internal */ Vector4._zero = new Vector4(0.0, 0.0, 0.0, 0.0);
4351
+ })();
4352
+ (function() {
4353
+ /** @internal */ Vector4._one = new Vector4(1.0, 1.0, 1.0, 1.0);
4354
+ })();
4353
4355
 
4354
4356
  /**
4355
4357
  * Describes a color in the from of RGBA (in order: R, G, B, A).
@@ -4559,7 +4561,7 @@ Matrix._tempMat30 = new Matrix3x3();
4559
4561
  out._onValueChanged && out._onValueChanged();
4560
4562
  return out;
4561
4563
  };
4562
- _createClass(Color, [
4564
+ _create_class(Color, [
4563
4565
  {
4564
4566
  key: "r",
4565
4567
  get: /**