@galacean/engine-math 0.0.0-experimental-1.3-xr.10 → 0.0.0-experimental-1.4-small-language.2

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.
package/dist/main.js CHANGED
@@ -4,33 +4,33 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  /**
6
6
  * Defines how the bounding volumes intersects or contain one another.
7
- */ exports.ContainmentType = void 0;
8
- (function(ContainmentType) {
9
- ContainmentType[ContainmentType[/** Indicates that there is no overlap between two bounding volumes. */ "Disjoint"] = 0] = "Disjoint";
10
- ContainmentType[ContainmentType[/** Indicates that one bounding volume completely contains another volume. */ "Contains"] = 1] = "Contains";
11
- ContainmentType[ContainmentType[/** Indicates that bounding volumes partially overlap one another. */ "Intersects"] = 2] = "Intersects";
12
- })(exports.ContainmentType || (exports.ContainmentType = {}));
7
+ */ var ContainmentType = /*#__PURE__*/ function(ContainmentType) {
8
+ /** Indicates that there is no overlap between two bounding volumes. */ ContainmentType[ContainmentType["Disjoint"] = 0] = "Disjoint";
9
+ /** Indicates that one bounding volume completely contains another volume. */ ContainmentType[ContainmentType["Contains"] = 1] = "Contains";
10
+ /** Indicates that bounding volumes partially overlap one another. */ ContainmentType[ContainmentType["Intersects"] = 2] = "Intersects";
11
+ return ContainmentType;
12
+ }({});
13
13
 
14
14
  /**
15
15
  * Defines the intersection between a plane and a bounding volume.
16
- */ exports.PlaneIntersectionType = void 0;
17
- (function(PlaneIntersectionType) {
18
- PlaneIntersectionType[PlaneIntersectionType[/** There is no intersection, the bounding volume is in the back of the plane. */ "Back"] = 0] = "Back";
19
- PlaneIntersectionType[PlaneIntersectionType[/** There is no intersection, the bounding volume is in the front of the plane. */ "Front"] = 1] = "Front";
20
- PlaneIntersectionType[PlaneIntersectionType[/** The plane is intersected. */ "Intersecting"] = 2] = "Intersecting";
21
- })(exports.PlaneIntersectionType || (exports.PlaneIntersectionType = {}));
16
+ */ var PlaneIntersectionType = /*#__PURE__*/ function(PlaneIntersectionType) {
17
+ /** There is no intersection, the bounding volume is in the back of the plane. */ PlaneIntersectionType[PlaneIntersectionType["Back"] = 0] = "Back";
18
+ /** There is no intersection, the bounding volume is in the front of the plane. */ PlaneIntersectionType[PlaneIntersectionType["Front"] = 1] = "Front";
19
+ /** The plane is intersected. */ PlaneIntersectionType[PlaneIntersectionType["Intersecting"] = 2] = "Intersecting";
20
+ return PlaneIntersectionType;
21
+ }({});
22
22
 
23
23
  /**
24
24
  * Frustum face
25
- */ exports.FrustumFace = void 0;
26
- (function(FrustumFace) {
27
- FrustumFace[FrustumFace[/** Near face */ "Near"] = 0] = "Near";
28
- FrustumFace[FrustumFace[/** Far face */ "Far"] = 1] = "Far";
29
- FrustumFace[FrustumFace[/** Left face */ "Left"] = 2] = "Left";
30
- FrustumFace[FrustumFace[/** Right face */ "Right"] = 3] = "Right";
31
- FrustumFace[FrustumFace[/** Bottom face */ "Bottom"] = 4] = "Bottom";
32
- FrustumFace[FrustumFace[/** Top face */ "Top"] = 5] = "Top";
33
- })(exports.FrustumFace || (exports.FrustumFace = {}));
25
+ */ var FrustumFace = /*#__PURE__*/ function(FrustumFace) {
26
+ /** Near face */ FrustumFace[FrustumFace["Near"] = 0] = "Near";
27
+ /** Far face */ FrustumFace[FrustumFace["Far"] = 1] = "Far";
28
+ /** Left face */ FrustumFace[FrustumFace["Left"] = 2] = "Left";
29
+ /** Right face */ FrustumFace[FrustumFace["Right"] = 3] = "Right";
30
+ /** Bottom face */ FrustumFace[FrustumFace["Bottom"] = 4] = "Bottom";
31
+ /** Top face */ FrustumFace[FrustumFace["Top"] = 5] = "Top";
32
+ return FrustumFace;
33
+ }({});
34
34
 
35
35
  function _defineProperties(target, props) {
36
36
  for (var i = 0; i < props.length; i++) {
@@ -104,15 +104,9 @@ function _create_class(Constructor, protoProps, staticProps) {
104
104
  };
105
105
  return MathUtil;
106
106
  }();
107
- (function() {
108
- /** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
109
- })();
110
- (function() {
111
- /** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
112
- })();
113
- (function() {
114
- /** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
115
- })();
107
+ /** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
108
+ /** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
109
+ /** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
116
110
 
117
111
  /**
118
112
  * Describes a 3D-vector.
@@ -137,7 +131,7 @@ function _create_class(Constructor, protoProps, staticProps) {
137
131
  this._x = x;
138
132
  this._y = y;
139
133
  this._z = z;
140
- this._onValueChanged && this._onValueChanged();
134
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
141
135
  return this;
142
136
  };
143
137
  /**
@@ -148,7 +142,7 @@ function _create_class(Constructor, protoProps, staticProps) {
148
142
  this._x += right._x;
149
143
  this._y += right._y;
150
144
  this._z += right._z;
151
- this._onValueChanged && this._onValueChanged();
145
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
152
146
  return this;
153
147
  };
154
148
  /**
@@ -159,7 +153,7 @@ function _create_class(Constructor, protoProps, staticProps) {
159
153
  this._x -= right._x;
160
154
  this._y -= right._y;
161
155
  this._z -= right._z;
162
- this._onValueChanged && this._onValueChanged();
156
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
163
157
  return this;
164
158
  };
165
159
  /**
@@ -170,7 +164,7 @@ function _create_class(Constructor, protoProps, staticProps) {
170
164
  this._x *= right._x;
171
165
  this._y *= right._y;
172
166
  this._z *= right._z;
173
- this._onValueChanged && this._onValueChanged();
167
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
174
168
  return this;
175
169
  };
176
170
  /**
@@ -181,7 +175,7 @@ function _create_class(Constructor, protoProps, staticProps) {
181
175
  this._x /= right._x;
182
176
  this._y /= right._y;
183
177
  this._z /= right._z;
184
- this._onValueChanged && this._onValueChanged();
178
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
185
179
  return this;
186
180
  };
187
181
  /**
@@ -205,7 +199,7 @@ function _create_class(Constructor, protoProps, staticProps) {
205
199
  this._x = -this._x;
206
200
  this._y = -this._y;
207
201
  this._z = -this._z;
208
- this._onValueChanged && this._onValueChanged();
202
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
209
203
  return this;
210
204
  };
211
205
  /**
@@ -223,7 +217,7 @@ function _create_class(Constructor, protoProps, staticProps) {
223
217
  this._x *= s;
224
218
  this._y *= s;
225
219
  this._z *= s;
226
- this._onValueChanged && this._onValueChanged();
220
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
227
221
  return this;
228
222
  };
229
223
  /**
@@ -284,10 +278,20 @@ function _create_class(Constructor, protoProps, staticProps) {
284
278
  this._x = source.x;
285
279
  this._y = source.y;
286
280
  this._z = source.z;
287
- this._onValueChanged && this._onValueChanged();
281
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
288
282
  return this;
289
283
  };
290
284
  /**
285
+ * Copy to vector3 like object.
286
+ * @param target - Vector3 like object
287
+ * @returns This Vector3 like object
288
+ */ _proto.copyTo = function copyTo(target) {
289
+ target.x = this._x;
290
+ target.y = this._y;
291
+ target.z = this._z;
292
+ return target;
293
+ };
294
+ /**
291
295
  * Copy the value of this vector from an array.
292
296
  * @param array - The array
293
297
  * @param offset - The start offset of the array
@@ -297,7 +301,7 @@ function _create_class(Constructor, protoProps, staticProps) {
297
301
  this._x = array[offset];
298
302
  this._y = array[offset + 1];
299
303
  this._z = array[offset + 2];
300
- this._onValueChanged && this._onValueChanged();
304
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
301
305
  return this;
302
306
  };
303
307
  /**
@@ -329,7 +333,7 @@ function _create_class(Constructor, protoProps, staticProps) {
329
333
  out._x = left._x + right._x;
330
334
  out._y = left._y + right._y;
331
335
  out._z = left._z + right._z;
332
- out._onValueChanged && out._onValueChanged();
336
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
333
337
  };
334
338
  /**
335
339
  * Determines the difference between two vectors.
@@ -340,7 +344,7 @@ function _create_class(Constructor, protoProps, staticProps) {
340
344
  out._x = left._x - right._x;
341
345
  out._y = left._y - right._y;
342
346
  out._z = left._z - right._z;
343
- out._onValueChanged && out._onValueChanged();
347
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
344
348
  };
345
349
  /**
346
350
  * Determines the product of two vectors.
@@ -351,7 +355,7 @@ function _create_class(Constructor, protoProps, staticProps) {
351
355
  out._x = left._x * right._x;
352
356
  out._y = left._y * right._y;
353
357
  out._z = left._z * right._z;
354
- out._onValueChanged && out._onValueChanged();
358
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
355
359
  };
356
360
  /**
357
361
  * Determines the divisor of two vectors.
@@ -362,7 +366,7 @@ function _create_class(Constructor, protoProps, staticProps) {
362
366
  out._x = left._x / right._x;
363
367
  out._y = left._y / right._y;
364
368
  out._z = left._z / right._z;
365
- out._onValueChanged && out._onValueChanged();
369
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
366
370
  };
367
371
  /**
368
372
  * Determines the dot product of two vectors.
@@ -427,7 +431,7 @@ function _create_class(Constructor, protoProps, staticProps) {
427
431
  out._x = _x + (end._x - _x) * t;
428
432
  out._y = _y + (end._y - _y) * t;
429
433
  out._z = _z + (end._z - _z) * t;
430
- out._onValueChanged && out._onValueChanged();
434
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
431
435
  };
432
436
  /**
433
437
  * Calculate a vector containing the largest components of the specified vectors.
@@ -438,7 +442,7 @@ function _create_class(Constructor, protoProps, staticProps) {
438
442
  out._x = Math.max(left._x, right._x);
439
443
  out._y = Math.max(left._y, right._y);
440
444
  out._z = Math.max(left._z, right._z);
441
- out._onValueChanged && out._onValueChanged();
445
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
442
446
  };
443
447
  /**
444
448
  * Calculate a vector containing the smallest components of the specified vectors.
@@ -449,7 +453,7 @@ function _create_class(Constructor, protoProps, staticProps) {
449
453
  out._x = Math.min(left._x, right._x);
450
454
  out._y = Math.min(left._y, right._y);
451
455
  out._z = Math.min(left._z, right._z);
452
- out._onValueChanged && out._onValueChanged();
456
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
453
457
  };
454
458
  /**
455
459
  * Reverses the direction of a given vector.
@@ -459,7 +463,7 @@ function _create_class(Constructor, protoProps, staticProps) {
459
463
  out._x = -a._x;
460
464
  out._y = -a._y;
461
465
  out._z = -a._z;
462
- out._onValueChanged && out._onValueChanged();
466
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
463
467
  };
464
468
  /**
465
469
  * Converts the vector into a unit vector.
@@ -482,7 +486,7 @@ function _create_class(Constructor, protoProps, staticProps) {
482
486
  out._x = a._x * s;
483
487
  out._y = a._y * s;
484
488
  out._z = a._z * s;
485
- out._onValueChanged && out._onValueChanged();
489
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
486
490
  };
487
491
  /**
488
492
  * Performs a normal transformation using the given 4x4 matrix.
@@ -501,7 +505,7 @@ function _create_class(Constructor, protoProps, staticProps) {
501
505
  out._x = _x * e[0] + _y * e[4] + _z * e[8];
502
506
  out._y = _x * e[1] + _y * e[5] + _z * e[9];
503
507
  out._z = _x * e[2] + _y * e[6] + _z * e[10];
504
- out._onValueChanged && out._onValueChanged();
508
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
505
509
  };
506
510
  /**
507
511
  * Performs a transformation using the given 4x4 matrix.
@@ -514,7 +518,7 @@ function _create_class(Constructor, protoProps, staticProps) {
514
518
  out._x = _x * e[0] + _y * e[4] + _z * e[8] + e[12];
515
519
  out._y = _x * e[1] + _y * e[5] + _z * e[9] + e[13];
516
520
  out._z = _x * e[2] + _y * e[6] + _z * e[10] + e[14];
517
- out._onValueChanged && out._onValueChanged();
521
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
518
522
  };
519
523
  /**
520
524
  * Performs a transformation from vector3 to vector4 using the given 4x4 matrix.
@@ -528,7 +532,7 @@ function _create_class(Constructor, protoProps, staticProps) {
528
532
  out._y = _x * e[1] + _y * e[5] + _z * e[9] + e[13];
529
533
  out._z = _x * e[2] + _y * e[6] + _z * e[10] + e[14];
530
534
  out._w = _x * e[3] + _y * e[7] + _z * e[11] + e[15];
531
- out._onValueChanged && out._onValueChanged();
535
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
532
536
  };
533
537
  /**
534
538
  * Performs a coordinate transformation using the given 4x4 matrix.
@@ -550,7 +554,7 @@ function _create_class(Constructor, protoProps, staticProps) {
550
554
  out._x = (_x * e[0] + _y * e[4] + _z * e[8] + e[12]) * w;
551
555
  out._y = (_x * e[1] + _y * e[5] + _z * e[9] + e[13]) * w;
552
556
  out._z = (_x * e[2] + _y * e[6] + _z * e[10] + e[14]) * w;
553
- out._onValueChanged && out._onValueChanged();
557
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
554
558
  };
555
559
  /**
556
560
  * Performs a transformation using the given quaternion.
@@ -569,7 +573,7 @@ function _create_class(Constructor, protoProps, staticProps) {
569
573
  out._x = ix * qw - iw * qx - iy * qz + iz * qy;
570
574
  out._y = iy * qw - iw * qy - iz * qx + ix * qz;
571
575
  out._z = iz * qw - iw * qz - ix * qy + iy * qx;
572
- out._onValueChanged && out._onValueChanged();
576
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
573
577
  };
574
578
  _create_class(Vector3, [
575
579
  {
@@ -581,7 +585,7 @@ function _create_class(Constructor, protoProps, staticProps) {
581
585
  },
582
586
  set: function set(value) {
583
587
  this._x = value;
584
- this._onValueChanged && this._onValueChanged();
588
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
585
589
  }
586
590
  },
587
591
  {
@@ -593,7 +597,7 @@ function _create_class(Constructor, protoProps, staticProps) {
593
597
  },
594
598
  set: function set(value) {
595
599
  this._y = value;
596
- this._onValueChanged && this._onValueChanged();
600
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
597
601
  }
598
602
  },
599
603
  {
@@ -605,18 +609,14 @@ function _create_class(Constructor, protoProps, staticProps) {
605
609
  },
606
610
  set: function set(value) {
607
611
  this._z = value;
608
- this._onValueChanged && this._onValueChanged();
612
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
609
613
  }
610
614
  }
611
615
  ]);
612
616
  return Vector3;
613
617
  }();
614
- (function() {
615
- /** @internal */ Vector3._zero = new Vector3(0.0, 0.0, 0.0);
616
- })();
617
- (function() {
618
- /** @internal */ Vector3._one = new Vector3(1.0, 1.0, 1.0);
619
- })();
618
+ /** @internal */ Vector3._zero = new Vector3(0.0, 0.0, 0.0);
619
+ /** @internal */ Vector3._one = new Vector3(1.0, 1.0, 1.0);
620
620
 
621
621
  /**
622
622
  * A bounding sphere.
@@ -685,9 +685,7 @@ function _create_class(Constructor, protoProps, staticProps) {
685
685
  };
686
686
  return BoundingSphere;
687
687
  }();
688
- (function() {
689
- BoundingSphere._tempVec30 = new Vector3();
690
- })();
688
+ BoundingSphere._tempVec30 = new Vector3();
691
689
 
692
690
  /**
693
691
  * Axis Aligned Bound Box (AABB).
@@ -710,7 +708,7 @@ function _create_class(Constructor, protoProps, staticProps) {
710
708
  var centerX = max._x + min._x;
711
709
  var centerY = max._y + min._y;
712
710
  var centerZ = max._z + min._z;
713
- out.set(isNaN(centerX) ? 0 : centerX * 0.5, isNaN(centerY) ? 0 : centerY * 0.5, isNaN(centerZ) ? 0 : centerZ * 0.5);
711
+ out.set(Number.isNaN(centerX) ? 0 : centerX * 0.5, Number.isNaN(centerY) ? 0 : centerY * 0.5, Number.isNaN(centerZ) ? 0 : centerZ * 0.5);
714
712
  return out;
715
713
  };
716
714
  /**
@@ -722,7 +720,7 @@ function _create_class(Constructor, protoProps, staticProps) {
722
720
  var extentX = max._x - min._x;
723
721
  var extentY = max._y - min._y;
724
722
  var extentZ = max._z - min._z;
725
- out.set(isNaN(extentX) ? 0 : extentX * 0.5, isNaN(extentY) ? 0 : extentY * 0.5, isNaN(extentZ) ? 0 : extentZ * 0.5);
723
+ out.set(Number.isNaN(extentX) ? 0 : extentX * 0.5, Number.isNaN(extentY) ? 0 : extentY * 0.5, Number.isNaN(extentZ) ? 0 : extentZ * 0.5);
726
724
  return out;
727
725
  };
728
726
  /**
@@ -852,12 +850,8 @@ function _create_class(Constructor, protoProps, staticProps) {
852
850
  };
853
851
  return BoundingBox;
854
852
  }();
855
- (function() {
856
- BoundingBox._tempVec30 = new Vector3();
857
- })();
858
- (function() {
859
- BoundingBox._tempVec31 = new Vector3();
860
- })();
853
+ BoundingBox._tempVec30 = new Vector3();
854
+ BoundingBox._tempVec31 = new Vector3();
861
855
 
862
856
  /**
863
857
  * Contains static methods to help in determining intersections, containment, etc.
@@ -901,12 +895,12 @@ function _create_class(Constructor, protoProps, staticProps) {
901
895
  */ CollisionUtil.intersectsPlaneAndPoint = function intersectsPlaneAndPoint(plane, point) {
902
896
  var distance = CollisionUtil.distancePlaneAndPoint(plane, point);
903
897
  if (distance > 0) {
904
- return exports.PlaneIntersectionType.Front;
898
+ return PlaneIntersectionType.Front;
905
899
  }
906
900
  if (distance < 0) {
907
- return exports.PlaneIntersectionType.Back;
901
+ return PlaneIntersectionType.Back;
908
902
  }
909
- return exports.PlaneIntersectionType.Intersecting;
903
+ return PlaneIntersectionType.Intersecting;
910
904
  };
911
905
  /**
912
906
  * Get the intersection type between a plane and a box (AABB).
@@ -940,12 +934,12 @@ function _create_class(Constructor, protoProps, staticProps) {
940
934
  back.z = max.z;
941
935
  }
942
936
  if (CollisionUtil.distancePlaneAndPoint(plane, front) < 0) {
943
- return exports.PlaneIntersectionType.Back;
937
+ return PlaneIntersectionType.Back;
944
938
  }
945
939
  if (CollisionUtil.distancePlaneAndPoint(plane, back) > 0) {
946
- return exports.PlaneIntersectionType.Front;
940
+ return PlaneIntersectionType.Front;
947
941
  }
948
- return exports.PlaneIntersectionType.Intersecting;
942
+ return PlaneIntersectionType.Intersecting;
949
943
  };
950
944
  /**
951
945
  * Get the intersection type between a plane and a sphere.
@@ -956,12 +950,12 @@ function _create_class(Constructor, protoProps, staticProps) {
956
950
  var center = sphere.center, radius = sphere.radius;
957
951
  var distance = CollisionUtil.distancePlaneAndPoint(plane, center);
958
952
  if (distance > radius) {
959
- return exports.PlaneIntersectionType.Front;
953
+ return PlaneIntersectionType.Front;
960
954
  }
961
955
  if (distance < -radius) {
962
- return exports.PlaneIntersectionType.Back;
956
+ return PlaneIntersectionType.Back;
963
957
  }
964
- return exports.PlaneIntersectionType.Intersecting;
958
+ return PlaneIntersectionType.Intersecting;
965
959
  };
966
960
  /**
967
961
  * Get the intersection type between a ray and a plane.
@@ -1150,41 +1144,41 @@ function _create_class(Constructor, protoProps, staticProps) {
1150
1144
  */ CollisionUtil.frustumContainsPoint = function frustumContainsPoint(frustum, point) {
1151
1145
  var distance = CollisionUtil.distancePlaneAndPoint(frustum.near, point);
1152
1146
  if (Math.abs(distance) < MathUtil.zeroTolerance) {
1153
- return exports.ContainmentType.Intersects;
1147
+ return ContainmentType.Intersects;
1154
1148
  } else if (distance < 0) {
1155
- return exports.ContainmentType.Disjoint;
1149
+ return ContainmentType.Disjoint;
1156
1150
  }
1157
1151
  distance = CollisionUtil.distancePlaneAndPoint(frustum.far, point);
1158
1152
  if (Math.abs(distance) < MathUtil.zeroTolerance) {
1159
- return exports.ContainmentType.Intersects;
1153
+ return ContainmentType.Intersects;
1160
1154
  } else if (distance < 0) {
1161
- return exports.ContainmentType.Disjoint;
1155
+ return ContainmentType.Disjoint;
1162
1156
  }
1163
1157
  distance = CollisionUtil.distancePlaneAndPoint(frustum.left, point);
1164
1158
  if (Math.abs(distance) < MathUtil.zeroTolerance) {
1165
- return exports.ContainmentType.Intersects;
1159
+ return ContainmentType.Intersects;
1166
1160
  } else if (distance < 0) {
1167
- return exports.ContainmentType.Disjoint;
1161
+ return ContainmentType.Disjoint;
1168
1162
  }
1169
1163
  distance = CollisionUtil.distancePlaneAndPoint(frustum.right, point);
1170
1164
  if (Math.abs(distance) < MathUtil.zeroTolerance) {
1171
- return exports.ContainmentType.Intersects;
1165
+ return ContainmentType.Intersects;
1172
1166
  } else if (distance < 0) {
1173
- return exports.ContainmentType.Disjoint;
1167
+ return ContainmentType.Disjoint;
1174
1168
  }
1175
1169
  distance = CollisionUtil.distancePlaneAndPoint(frustum.top, point);
1176
1170
  if (Math.abs(distance) < MathUtil.zeroTolerance) {
1177
- return exports.ContainmentType.Intersects;
1171
+ return ContainmentType.Intersects;
1178
1172
  } else if (distance < 0) {
1179
- return exports.ContainmentType.Disjoint;
1173
+ return ContainmentType.Disjoint;
1180
1174
  }
1181
1175
  distance = CollisionUtil.distancePlaneAndPoint(frustum.bottom, point);
1182
1176
  if (Math.abs(distance) < MathUtil.zeroTolerance) {
1183
- return exports.ContainmentType.Intersects;
1177
+ return ContainmentType.Intersects;
1184
1178
  } else if (distance < 0) {
1185
- return exports.ContainmentType.Disjoint;
1179
+ return ContainmentType.Disjoint;
1186
1180
  }
1187
- return exports.ContainmentType.Contains;
1181
+ return ContainmentType.Contains;
1188
1182
  };
1189
1183
  /**
1190
1184
  * Get the containment type between a frustum and a box (AABB).
@@ -1195,7 +1189,7 @@ function _create_class(Constructor, protoProps, staticProps) {
1195
1189
  var min = box.min, max = box.max;
1196
1190
  var p = CollisionUtil._tempVec30;
1197
1191
  var n = CollisionUtil._tempVec31;
1198
- var result = exports.ContainmentType.Contains;
1192
+ var result = ContainmentType.Contains;
1199
1193
  for(var i = 0; i < 6; ++i){
1200
1194
  var plane = frustum.getPlane(i);
1201
1195
  var normal = plane.normal;
@@ -1220,11 +1214,11 @@ function _create_class(Constructor, protoProps, staticProps) {
1220
1214
  p.z = min.z;
1221
1215
  n.z = max.z;
1222
1216
  }
1223
- if (CollisionUtil.intersectsPlaneAndPoint(plane, p) === exports.PlaneIntersectionType.Back) {
1224
- return exports.ContainmentType.Disjoint;
1217
+ if (CollisionUtil.intersectsPlaneAndPoint(plane, p) === PlaneIntersectionType.Back) {
1218
+ return ContainmentType.Disjoint;
1225
1219
  }
1226
- if (CollisionUtil.intersectsPlaneAndPoint(plane, n) === exports.PlaneIntersectionType.Back) {
1227
- result = exports.ContainmentType.Intersects;
1220
+ if (CollisionUtil.intersectsPlaneAndPoint(plane, n) === PlaneIntersectionType.Back) {
1221
+ result = ContainmentType.Intersects;
1228
1222
  }
1229
1223
  }
1230
1224
  return result;
@@ -1235,14 +1229,14 @@ function _create_class(Constructor, protoProps, staticProps) {
1235
1229
  * @param sphere - The sphere
1236
1230
  * @returns The containment type
1237
1231
  */ CollisionUtil.frustumContainsSphere = function frustumContainsSphere(frustum, sphere) {
1238
- var result = exports.ContainmentType.Contains;
1232
+ var result = ContainmentType.Contains;
1239
1233
  for(var i = 0; i < 6; ++i){
1240
1234
  var plane = frustum.getPlane(i);
1241
1235
  var intersectionType = CollisionUtil.intersectsPlaneAndSphere(plane, sphere);
1242
- if (intersectionType === exports.PlaneIntersectionType.Back) {
1243
- return exports.ContainmentType.Disjoint;
1244
- } else if (intersectionType === exports.PlaneIntersectionType.Intersecting) {
1245
- result = exports.ContainmentType.Intersects;
1236
+ if (intersectionType === PlaneIntersectionType.Back) {
1237
+ return ContainmentType.Disjoint;
1238
+ } else if (intersectionType === PlaneIntersectionType.Intersecting) {
1239
+ result = ContainmentType.Intersects;
1246
1240
  break;
1247
1241
  }
1248
1242
  }
@@ -1250,15 +1244,9 @@ function _create_class(Constructor, protoProps, staticProps) {
1250
1244
  };
1251
1245
  return CollisionUtil;
1252
1246
  }();
1253
- (function() {
1254
- CollisionUtil._tempVec30 = new Vector3();
1255
- })();
1256
- (function() {
1257
- CollisionUtil._tempVec31 = new Vector3();
1258
- })();
1259
- (function() {
1260
- CollisionUtil._tempVec32 = new Vector3();
1261
- })();
1247
+ CollisionUtil._tempVec30 = new Vector3();
1248
+ CollisionUtil._tempVec31 = new Vector3();
1249
+ CollisionUtil._tempVec32 = new Vector3();
1262
1250
 
1263
1251
  /**
1264
1252
  * Represents a plane in three-dimensional space.
@@ -1358,17 +1346,17 @@ function _create_class(Constructor, protoProps, staticProps) {
1358
1346
  * @returns The plane get
1359
1347
  */ _proto.getPlane = function getPlane(face) {
1360
1348
  switch(face){
1361
- case exports.FrustumFace.Near:
1349
+ case FrustumFace.Near:
1362
1350
  return this.near;
1363
- case exports.FrustumFace.Far:
1351
+ case FrustumFace.Far:
1364
1352
  return this.far;
1365
- case exports.FrustumFace.Left:
1353
+ case FrustumFace.Left:
1366
1354
  return this.left;
1367
- case exports.FrustumFace.Right:
1355
+ case FrustumFace.Right:
1368
1356
  return this.right;
1369
- case exports.FrustumFace.Bottom:
1357
+ case FrustumFace.Bottom:
1370
1358
  return this.bottom;
1371
- case exports.FrustumFace.Top:
1359
+ case FrustumFace.Top:
1372
1360
  return this.top;
1373
1361
  default:
1374
1362
  return null;
@@ -1438,7 +1426,7 @@ function _create_class(Constructor, protoProps, staticProps) {
1438
1426
  * @param sphere - The sphere for testing
1439
1427
  * @returns True if bounding sphere intersects with this frustum, false otherwise
1440
1428
  */ _proto.intersectsSphere = function intersectsSphere(sphere) {
1441
- return CollisionUtil.frustumContainsSphere(this, sphere) !== exports.ContainmentType.Disjoint;
1429
+ return CollisionUtil.frustumContainsSphere(this, sphere) !== ContainmentType.Disjoint;
1442
1430
  };
1443
1431
  /**
1444
1432
  * Creates a clone of this frustum.
@@ -2034,7 +2022,7 @@ function _create_class(Constructor, protoProps, staticProps) {
2034
2022
  this._y = y;
2035
2023
  this._z = z;
2036
2024
  this._w = w;
2037
- this._onValueChanged && this._onValueChanged();
2025
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
2038
2026
  return this;
2039
2027
  };
2040
2028
  /**
@@ -2044,7 +2032,7 @@ function _create_class(Constructor, protoProps, staticProps) {
2044
2032
  this._x *= -1;
2045
2033
  this._y *= -1;
2046
2034
  this._z *= -1;
2047
- this._onValueChanged && this._onValueChanged();
2035
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
2048
2036
  return this;
2049
2037
  };
2050
2038
  /**
@@ -2075,7 +2063,7 @@ function _create_class(Constructor, protoProps, staticProps) {
2075
2063
  this._y = 0;
2076
2064
  this._z = 0;
2077
2065
  this._w = 1;
2078
- this._onValueChanged && this._onValueChanged();
2066
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
2079
2067
  return this;
2080
2068
  };
2081
2069
  /**
@@ -2108,7 +2096,7 @@ function _create_class(Constructor, protoProps, staticProps) {
2108
2096
  var t = out._x;
2109
2097
  out._x = out._y;
2110
2098
  out._y = t;
2111
- out._onValueChanged && out._onValueChanged();
2099
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2112
2100
  return out;
2113
2101
  };
2114
2102
  /**
@@ -2117,7 +2105,7 @@ function _create_class(Constructor, protoProps, staticProps) {
2117
2105
  * @returns Euler x->yaw y->pitch z->roll
2118
2106
  */ _proto.toYawPitchRoll = function toYawPitchRoll(out) {
2119
2107
  this._toYawPitchRoll(out);
2120
- out._onValueChanged && out._onValueChanged();
2108
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2121
2109
  return out;
2122
2110
  };
2123
2111
  /**
@@ -2209,10 +2197,21 @@ function _create_class(Constructor, protoProps, staticProps) {
2209
2197
  this._y = source.y;
2210
2198
  this._z = source.z;
2211
2199
  this._w = source.w;
2212
- this._onValueChanged && this._onValueChanged();
2200
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
2213
2201
  return this;
2214
2202
  };
2215
2203
  /**
2204
+ * Copy this quaternion to the specified quaternion.
2205
+ * @param target - The specified quaternion
2206
+ * @returns This specified quaternion
2207
+ */ _proto.copyTo = function copyTo(target) {
2208
+ target.x = this._x;
2209
+ target.y = this._y;
2210
+ target.z = this._z;
2211
+ target.w = this._w;
2212
+ return target;
2213
+ };
2214
+ /**
2216
2215
  * Copy the value of this quaternion from an array.
2217
2216
  * @param array - The array
2218
2217
  * @param offset - The start offset of the array
@@ -2223,7 +2222,7 @@ function _create_class(Constructor, protoProps, staticProps) {
2223
2222
  this._y = array[offset + 1];
2224
2223
  this._z = array[offset + 2];
2225
2224
  this._w = array[offset + 3];
2226
- this._onValueChanged && this._onValueChanged();
2225
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
2227
2226
  return this;
2228
2227
  };
2229
2228
  /**
@@ -2281,7 +2280,7 @@ function _create_class(Constructor, protoProps, staticProps) {
2281
2280
  out._y = left._y + right._y;
2282
2281
  out._z = left._z + right._z;
2283
2282
  out._w = left._w + right._w;
2284
- out._onValueChanged && out._onValueChanged();
2283
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2285
2284
  };
2286
2285
  /**
2287
2286
  * Determines the product of two quaternions.
@@ -2295,7 +2294,7 @@ function _create_class(Constructor, protoProps, staticProps) {
2295
2294
  out._y = ay * bw + aw * by + az * bx - ax * bz;
2296
2295
  out._z = az * bw + aw * bz + ax * by - ay * bx;
2297
2296
  out._w = aw * bw - ax * bx - ay * by - az * bz;
2298
- out._onValueChanged && out._onValueChanged();
2297
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2299
2298
  };
2300
2299
  /**
2301
2300
  * Calculate quaternion that contains conjugated version of the specified quaternion.
@@ -2306,7 +2305,7 @@ function _create_class(Constructor, protoProps, staticProps) {
2306
2305
  out._y = -a._y;
2307
2306
  out._z = -a._z;
2308
2307
  out._w = a._w;
2309
- out._onValueChanged && out._onValueChanged();
2308
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2310
2309
  };
2311
2310
  /**
2312
2311
  * Determines the dot product of two quaternions.
@@ -2338,7 +2337,7 @@ function _create_class(Constructor, protoProps, staticProps) {
2338
2337
  out._y = normalAxis._y * s;
2339
2338
  out._z = normalAxis._z * s;
2340
2339
  out._w = Math.cos(rad);
2341
- out._onValueChanged && out._onValueChanged();
2340
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2342
2341
  };
2343
2342
  /**
2344
2343
  * Calculate a quaternion rotates around x, y, z axis (pitch/yaw/roll).
@@ -2371,7 +2370,7 @@ function _create_class(Constructor, protoProps, staticProps) {
2371
2370
  out._y = sinYaw * cosPitch * cosRoll - cosYaw * sinPitch * sinRoll;
2372
2371
  out._z = cosYawPitch * sinRoll - sinYawPitch * cosRoll;
2373
2372
  out._w = cosYawPitch * cosRoll + sinYawPitch * sinRoll;
2374
- out._onValueChanged && out._onValueChanged();
2373
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2375
2374
  };
2376
2375
  /**
2377
2376
  * Calculate a quaternion from the specified 3x3 matrix.
@@ -2413,7 +2412,7 @@ function _create_class(Constructor, protoProps, staticProps) {
2413
2412
  out._z = 0.5 * sqrt;
2414
2413
  out._w = (m12 - m21) * half;
2415
2414
  }
2416
- out._onValueChanged && out._onValueChanged();
2415
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2417
2416
  };
2418
2417
  /**
2419
2418
  * Calculate the inverse of the specified quaternion.
@@ -2428,7 +2427,7 @@ function _create_class(Constructor, protoProps, staticProps) {
2428
2427
  out._y = -y * invDot;
2429
2428
  out._z = -z * invDot;
2430
2429
  out._w = w * invDot;
2431
- out._onValueChanged && out._onValueChanged();
2430
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2432
2431
  }
2433
2432
  };
2434
2433
  /**
@@ -2475,7 +2474,7 @@ function _create_class(Constructor, protoProps, staticProps) {
2475
2474
  out.y = inverse * start.y + opposite * end.y;
2476
2475
  out.z = inverse * start.z + opposite * end.z;
2477
2476
  out.w = inverse * start.w + opposite * end.w;
2478
- out._onValueChanged && out._onValueChanged();
2477
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2479
2478
  };
2480
2479
  /**
2481
2480
  * Scales the specified quaternion magnitude to unit length.
@@ -2490,7 +2489,7 @@ function _create_class(Constructor, protoProps, staticProps) {
2490
2489
  out._y = _y * len;
2491
2490
  out._z = _z * len;
2492
2491
  out._w = _w * len;
2493
- out._onValueChanged && out._onValueChanged();
2492
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2494
2493
  }
2495
2494
  };
2496
2495
  /**
@@ -2505,7 +2504,7 @@ function _create_class(Constructor, protoProps, staticProps) {
2505
2504
  out._y = 0;
2506
2505
  out._z = 0;
2507
2506
  out._w = c;
2508
- out._onValueChanged && out._onValueChanged();
2507
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2509
2508
  };
2510
2509
  /**
2511
2510
  * Calculate a quaternion rotate around Y axis.
@@ -2519,7 +2518,7 @@ function _create_class(Constructor, protoProps, staticProps) {
2519
2518
  out._y = s;
2520
2519
  out._z = 0;
2521
2520
  out._w = c;
2522
- out._onValueChanged && out._onValueChanged();
2521
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2523
2522
  };
2524
2523
  /**
2525
2524
  * Calculate a quaternion rotate around Z axis.
@@ -2533,7 +2532,7 @@ function _create_class(Constructor, protoProps, staticProps) {
2533
2532
  out._y = 0;
2534
2533
  out._z = s;
2535
2534
  out._w = c;
2536
- out._onValueChanged && out._onValueChanged();
2535
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2537
2536
  };
2538
2537
  /**
2539
2538
  * Calculate a quaternion that the specified quaternion rotate around X axis.
@@ -2549,7 +2548,7 @@ function _create_class(Constructor, protoProps, staticProps) {
2549
2548
  out._y = _y * bw + _z * bx;
2550
2549
  out._z = _z * bw - _y * bx;
2551
2550
  out._w = _w * bw - _x * bx;
2552
- out._onValueChanged && out._onValueChanged();
2551
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2553
2552
  };
2554
2553
  /**
2555
2554
  * Calculate a quaternion that the specified quaternion rotate around Y axis.
@@ -2565,7 +2564,7 @@ function _create_class(Constructor, protoProps, staticProps) {
2565
2564
  out._y = _y * bw + _w * by;
2566
2565
  out._z = _z * bw + _x * by;
2567
2566
  out._w = _w * bw - _y * by;
2568
- out._onValueChanged && out._onValueChanged();
2567
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2569
2568
  };
2570
2569
  /**
2571
2570
  * Calculate a quaternion that the specified quaternion rotate around Z axis.
@@ -2581,7 +2580,7 @@ function _create_class(Constructor, protoProps, staticProps) {
2581
2580
  out._y = _y * bw - _x * bz;
2582
2581
  out._z = _z * bw + _w * bz;
2583
2582
  out._w = _w * bw - _z * bz;
2584
- out._onValueChanged && out._onValueChanged();
2583
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2585
2584
  };
2586
2585
  /**
2587
2586
  * Scale a quaternion by a given number.
@@ -2593,7 +2592,7 @@ function _create_class(Constructor, protoProps, staticProps) {
2593
2592
  out._y = a._y * s;
2594
2593
  out._z = a._z * s;
2595
2594
  out._w = a._w * s;
2596
- out._onValueChanged && out._onValueChanged();
2595
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2597
2596
  };
2598
2597
  _create_class(Quaternion, [
2599
2598
  {
@@ -2605,7 +2604,7 @@ function _create_class(Constructor, protoProps, staticProps) {
2605
2604
  },
2606
2605
  set: function set(value) {
2607
2606
  this._x = value;
2608
- this._onValueChanged && this._onValueChanged();
2607
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
2609
2608
  }
2610
2609
  },
2611
2610
  {
@@ -2617,7 +2616,7 @@ function _create_class(Constructor, protoProps, staticProps) {
2617
2616
  },
2618
2617
  set: function set(value) {
2619
2618
  this._y = value;
2620
- this._onValueChanged && this._onValueChanged();
2619
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
2621
2620
  }
2622
2621
  },
2623
2622
  {
@@ -2629,7 +2628,7 @@ function _create_class(Constructor, protoProps, staticProps) {
2629
2628
  },
2630
2629
  set: function set(value) {
2631
2630
  this._z = value;
2632
- this._onValueChanged && this._onValueChanged();
2631
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
2633
2632
  }
2634
2633
  },
2635
2634
  {
@@ -2649,18 +2648,14 @@ function _create_class(Constructor, protoProps, staticProps) {
2649
2648
  },
2650
2649
  set: function set(value) {
2651
2650
  this._w = value;
2652
- this._onValueChanged && this._onValueChanged();
2651
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
2653
2652
  }
2654
2653
  }
2655
2654
  ]);
2656
2655
  return Quaternion;
2657
2656
  }();
2658
- (function() {
2659
- /** @internal */ Quaternion._tempVector3 = new Vector3();
2660
- })();
2661
- (function() {
2662
- /** @internal */ Quaternion._tempQuat1 = new Quaternion();
2663
- })();
2657
+ /** @internal */ Quaternion._tempVector3 = new Vector3();
2658
+ /** @internal */ Quaternion._tempQuat1 = new Quaternion();
2664
2659
 
2665
2660
  /**
2666
2661
  * Represents a 4x4 mathematical matrix.
@@ -2859,7 +2854,7 @@ function _create_class(Constructor, protoProps, staticProps) {
2859
2854
  out._y = (e[6] + e[9]) / s3;
2860
2855
  out._z = 0.25 * s3;
2861
2856
  }
2862
- out._onValueChanged && out._onValueChanged();
2857
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2863
2858
  return out;
2864
2859
  };
2865
2860
  /**
@@ -3601,21 +3596,11 @@ function _create_class(Constructor, protoProps, staticProps) {
3601
3596
  };
3602
3597
  return Matrix;
3603
3598
  }();
3604
- (function() {
3605
- Matrix._tempVec30 = new Vector3();
3606
- })();
3607
- (function() {
3608
- Matrix._tempVec31 = new Vector3();
3609
- })();
3610
- (function() {
3611
- Matrix._tempVec32 = new Vector3();
3612
- })();
3613
- (function() {
3614
- Matrix._tempMat30 = new Matrix3x3();
3615
- })();
3616
- (function() {
3617
- /** @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);
3618
- })();
3599
+ Matrix._tempVec30 = new Vector3();
3600
+ Matrix._tempVec31 = new Vector3();
3601
+ Matrix._tempVec32 = new Vector3();
3602
+ Matrix._tempMat30 = new Matrix3x3();
3603
+ /** @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);
3619
3604
 
3620
3605
  /**
3621
3606
  * Represents a ray with an origin and a direction in 3D space.
@@ -3681,7 +3666,7 @@ function _create_class(Constructor, protoProps, staticProps) {
3681
3666
  */ _proto.set = function set(x, y) {
3682
3667
  this._x = x;
3683
3668
  this._y = y;
3684
- this._onValueChanged && this._onValueChanged();
3669
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
3685
3670
  return this;
3686
3671
  };
3687
3672
  /**
@@ -3691,7 +3676,7 @@ function _create_class(Constructor, protoProps, staticProps) {
3691
3676
  */ _proto.add = function add(right) {
3692
3677
  this._x += right._x;
3693
3678
  this._y += right._y;
3694
- this._onValueChanged && this._onValueChanged();
3679
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
3695
3680
  return this;
3696
3681
  };
3697
3682
  /**
@@ -3701,7 +3686,7 @@ function _create_class(Constructor, protoProps, staticProps) {
3701
3686
  */ _proto.subtract = function subtract(right) {
3702
3687
  this._x -= right._x;
3703
3688
  this._y -= right._y;
3704
- this._onValueChanged && this._onValueChanged();
3689
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
3705
3690
  return this;
3706
3691
  };
3707
3692
  /**
@@ -3711,7 +3696,7 @@ function _create_class(Constructor, protoProps, staticProps) {
3711
3696
  */ _proto.multiply = function multiply(right) {
3712
3697
  this._x *= right._x;
3713
3698
  this._y *= right._y;
3714
- this._onValueChanged && this._onValueChanged();
3699
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
3715
3700
  return this;
3716
3701
  };
3717
3702
  /**
@@ -3721,7 +3706,7 @@ function _create_class(Constructor, protoProps, staticProps) {
3721
3706
  */ _proto.divide = function divide(right) {
3722
3707
  this._x /= right._x;
3723
3708
  this._y /= right._y;
3724
- this._onValueChanged && this._onValueChanged();
3709
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
3725
3710
  return this;
3726
3711
  };
3727
3712
  /**
@@ -3744,7 +3729,7 @@ function _create_class(Constructor, protoProps, staticProps) {
3744
3729
  */ _proto.negate = function negate() {
3745
3730
  this._x = -this._x;
3746
3731
  this._y = -this._y;
3747
- this._onValueChanged && this._onValueChanged();
3732
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
3748
3733
  return this;
3749
3734
  };
3750
3735
  /**
@@ -3761,7 +3746,7 @@ function _create_class(Constructor, protoProps, staticProps) {
3761
3746
  */ _proto.scale = function scale(s) {
3762
3747
  this._x *= s;
3763
3748
  this._y *= s;
3764
- this._onValueChanged && this._onValueChanged();
3749
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
3765
3750
  return this;
3766
3751
  };
3767
3752
  /**
@@ -3777,10 +3762,19 @@ function _create_class(Constructor, protoProps, staticProps) {
3777
3762
  */ _proto.copyFrom = function copyFrom(source) {
3778
3763
  this._x = source.x;
3779
3764
  this._y = source.y;
3780
- this._onValueChanged && this._onValueChanged();
3765
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
3781
3766
  return this;
3782
3767
  };
3783
3768
  /**
3769
+ * Copy to vector2 like object.
3770
+ * @param target - Vector2 like object
3771
+ * @returns This Vector2 like object
3772
+ */ _proto.copyTo = function copyTo(target) {
3773
+ target.x = this._x;
3774
+ target.y = this._y;
3775
+ return target;
3776
+ };
3777
+ /**
3784
3778
  * Copy the value of this vector from an array.
3785
3779
  * @param array - The array
3786
3780
  * @param offset - The start offset of the array
@@ -3789,7 +3783,7 @@ function _create_class(Constructor, protoProps, staticProps) {
3789
3783
  if (offset === void 0) offset = 0;
3790
3784
  this._x = array[offset];
3791
3785
  this._y = array[offset + 1];
3792
- this._onValueChanged && this._onValueChanged();
3786
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
3793
3787
  return this;
3794
3788
  };
3795
3789
  /**
@@ -3818,7 +3812,7 @@ function _create_class(Constructor, protoProps, staticProps) {
3818
3812
  */ Vector2.add = function add(left, right, out) {
3819
3813
  out._x = left._x + right._x;
3820
3814
  out._y = left._y + right._y;
3821
- out._onValueChanged && out._onValueChanged();
3815
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
3822
3816
  };
3823
3817
  /**
3824
3818
  * Determines the difference between two vectors.
@@ -3828,7 +3822,7 @@ function _create_class(Constructor, protoProps, staticProps) {
3828
3822
  */ Vector2.subtract = function subtract(left, right, out) {
3829
3823
  out._x = left._x - right._x;
3830
3824
  out._y = left._y - right._y;
3831
- out._onValueChanged && out._onValueChanged();
3825
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
3832
3826
  };
3833
3827
  /**
3834
3828
  * Determines the product of two vectors.
@@ -3838,7 +3832,7 @@ function _create_class(Constructor, protoProps, staticProps) {
3838
3832
  */ Vector2.multiply = function multiply(left, right, out) {
3839
3833
  out._x = left._x * right._x;
3840
3834
  out._y = left._y * right._y;
3841
- out._onValueChanged && out._onValueChanged();
3835
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
3842
3836
  };
3843
3837
  /**
3844
3838
  * Determines the divisor of two vectors.
@@ -3848,7 +3842,7 @@ function _create_class(Constructor, protoProps, staticProps) {
3848
3842
  */ Vector2.divide = function divide(left, right, out) {
3849
3843
  out._x = left._x / right._x;
3850
3844
  out._y = left._y / right._y;
3851
- out._onValueChanged && out._onValueChanged();
3845
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
3852
3846
  };
3853
3847
  /**
3854
3848
  * Determines the dot product of two vectors.
@@ -3896,7 +3890,7 @@ function _create_class(Constructor, protoProps, staticProps) {
3896
3890
  var _x = left._x, _y = left._y;
3897
3891
  out._x = _x + (right._x - _x) * t;
3898
3892
  out._y = _y + (right._y - _y) * t;
3899
- out._onValueChanged && out._onValueChanged();
3893
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
3900
3894
  };
3901
3895
  /**
3902
3896
  * Calculate a vector containing the largest components of the specified vectors.
@@ -3906,7 +3900,7 @@ function _create_class(Constructor, protoProps, staticProps) {
3906
3900
  */ Vector2.max = function max(left, right, out) {
3907
3901
  out._x = Math.max(left._x, right._x);
3908
3902
  out._y = Math.max(left._y, right._y);
3909
- out._onValueChanged && out._onValueChanged();
3903
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
3910
3904
  };
3911
3905
  /**
3912
3906
  * Calculate a vector containing the smallest components of the specified vectors.
@@ -3916,7 +3910,7 @@ function _create_class(Constructor, protoProps, staticProps) {
3916
3910
  */ Vector2.min = function min(left, right, out) {
3917
3911
  out._x = Math.min(left._x, right._x);
3918
3912
  out._y = Math.min(left._y, right._y);
3919
- out._onValueChanged && out._onValueChanged();
3913
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
3920
3914
  };
3921
3915
  /**
3922
3916
  * Reverses the direction of a given vector.
@@ -3925,7 +3919,7 @@ function _create_class(Constructor, protoProps, staticProps) {
3925
3919
  */ Vector2.negate = function negate(left, out) {
3926
3920
  out._x = -left._x;
3927
3921
  out._y = -left._y;
3928
- out._onValueChanged && out._onValueChanged();
3922
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
3929
3923
  };
3930
3924
  /**
3931
3925
  * Converts the vector into a unit vector.
@@ -3938,7 +3932,7 @@ function _create_class(Constructor, protoProps, staticProps) {
3938
3932
  len = 1 / len;
3939
3933
  out._x = _x * len;
3940
3934
  out._y = _y * len;
3941
- out._onValueChanged && out._onValueChanged();
3935
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
3942
3936
  }
3943
3937
  };
3944
3938
  /**
@@ -3949,7 +3943,7 @@ function _create_class(Constructor, protoProps, staticProps) {
3949
3943
  */ Vector2.scale = function scale(left, s, out) {
3950
3944
  out._x = left._x * s;
3951
3945
  out._y = left._y * s;
3952
- out._onValueChanged && out._onValueChanged();
3946
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
3953
3947
  };
3954
3948
  _create_class(Vector2, [
3955
3949
  {
@@ -3961,7 +3955,7 @@ function _create_class(Constructor, protoProps, staticProps) {
3961
3955
  },
3962
3956
  set: function set(value) {
3963
3957
  this._x = value;
3964
- this._onValueChanged && this._onValueChanged();
3958
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
3965
3959
  }
3966
3960
  },
3967
3961
  {
@@ -3973,18 +3967,14 @@ function _create_class(Constructor, protoProps, staticProps) {
3973
3967
  },
3974
3968
  set: function set(value) {
3975
3969
  this._y = value;
3976
- this._onValueChanged && this._onValueChanged();
3970
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
3977
3971
  }
3978
3972
  }
3979
3973
  ]);
3980
3974
  return Vector2;
3981
3975
  }();
3982
- (function() {
3983
- /** @internal */ Vector2._zero = new Vector2(0.0, 0.0);
3984
- })();
3985
- (function() {
3986
- /** @internal */ Vector2._one = new Vector2(1.0, 1.0);
3987
- })();
3976
+ /** @internal */ Vector2._zero = new Vector2(0.0, 0.0);
3977
+ /** @internal */ Vector2._one = new Vector2(1.0, 1.0);
3988
3978
 
3989
3979
  /**
3990
3980
  * Describes a 4D-vector.
@@ -4013,7 +4003,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4013
4003
  this._y = y;
4014
4004
  this._z = z;
4015
4005
  this._w = w;
4016
- this._onValueChanged && this._onValueChanged();
4006
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4017
4007
  return this;
4018
4008
  };
4019
4009
  /**
@@ -4025,7 +4015,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4025
4015
  this._y += right._y;
4026
4016
  this._z += right._z;
4027
4017
  this._w += right._w;
4028
- this._onValueChanged && this._onValueChanged();
4018
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4029
4019
  return this;
4030
4020
  };
4031
4021
  /**
@@ -4037,7 +4027,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4037
4027
  this._y -= right._y;
4038
4028
  this._z -= right._z;
4039
4029
  this._w -= right._w;
4040
- this._onValueChanged && this._onValueChanged();
4030
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4041
4031
  return this;
4042
4032
  };
4043
4033
  /**
@@ -4049,7 +4039,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4049
4039
  this._y *= right._y;
4050
4040
  this._z *= right._z;
4051
4041
  this._w *= right._w;
4052
- this._onValueChanged && this._onValueChanged();
4042
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4053
4043
  return this;
4054
4044
  };
4055
4045
  /**
@@ -4061,7 +4051,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4061
4051
  this._y /= right._y;
4062
4052
  this._z /= right._z;
4063
4053
  this._w /= right._w;
4064
- this._onValueChanged && this._onValueChanged();
4054
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4065
4055
  return this;
4066
4056
  };
4067
4057
  /**
@@ -4086,7 +4076,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4086
4076
  this._y = -this._y;
4087
4077
  this._z = -this._z;
4088
4078
  this._w = -this._w;
4089
- this._onValueChanged && this._onValueChanged();
4079
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4090
4080
  return this;
4091
4081
  };
4092
4082
  /**
@@ -4105,7 +4095,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4105
4095
  this._y *= s;
4106
4096
  this._z *= s;
4107
4097
  this._w *= s;
4108
- this._onValueChanged && this._onValueChanged();
4098
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4109
4099
  return this;
4110
4100
  };
4111
4101
  /**
@@ -4124,10 +4114,21 @@ function _create_class(Constructor, protoProps, staticProps) {
4124
4114
  this._y = source.y;
4125
4115
  this._z = source.z;
4126
4116
  this._w = source.w;
4127
- this._onValueChanged && this._onValueChanged();
4117
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4128
4118
  return this;
4129
4119
  };
4130
4120
  /**
4121
+ * Copy to vector4 like object.
4122
+ * @param target - Vector4 like object
4123
+ * @returns This Vector4 like object
4124
+ */ _proto.copyTo = function copyTo(target) {
4125
+ target.x = this._x;
4126
+ target.y = this._y;
4127
+ target.z = this._z;
4128
+ target.w = this._w;
4129
+ return target;
4130
+ };
4131
+ /**
4131
4132
  * Copy the value of this vector by an array.
4132
4133
  * @param array - The array
4133
4134
  * @param offset - The start offset of the array
@@ -4138,7 +4139,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4138
4139
  this._y = array[offset + 1];
4139
4140
  this._z = array[offset + 2];
4140
4141
  this._w = array[offset + 3];
4141
- this._onValueChanged && this._onValueChanged();
4142
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4142
4143
  return this;
4143
4144
  };
4144
4145
  /**
@@ -4173,7 +4174,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4173
4174
  out._y = left._y + right._y;
4174
4175
  out._z = left._z + right._z;
4175
4176
  out._w = left._w + right._w;
4176
- out._onValueChanged && out._onValueChanged();
4177
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
4177
4178
  };
4178
4179
  /**
4179
4180
  * Determines the difference between two vectors.
@@ -4185,7 +4186,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4185
4186
  out._y = left._y - right._y;
4186
4187
  out._z = left._z - right._z;
4187
4188
  out._w = left._w - right._w;
4188
- out._onValueChanged && out._onValueChanged();
4189
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
4189
4190
  };
4190
4191
  /**
4191
4192
  * Determines the product of two vectors.
@@ -4197,7 +4198,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4197
4198
  out._y = left._y * right._y;
4198
4199
  out._z = left._z * right._z;
4199
4200
  out._w = left._w * right._w;
4200
- out._onValueChanged && out._onValueChanged();
4201
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
4201
4202
  };
4202
4203
  /**
4203
4204
  * Determines the divisor of two vectors.
@@ -4209,7 +4210,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4209
4210
  out._y = left._y / right._y;
4210
4211
  out._z = left._z / right._z;
4211
4212
  out._w = left._w / right._w;
4212
- out._onValueChanged && out._onValueChanged();
4213
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
4213
4214
  };
4214
4215
  /**
4215
4216
  * Determines the dot product of two vectors.
@@ -4263,7 +4264,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4263
4264
  out._y = _y + (end._y - _y) * t;
4264
4265
  out._z = _z + (end._z - _z) * t;
4265
4266
  out._w = _w + (end._w - _w) * t;
4266
- out._onValueChanged && out._onValueChanged();
4267
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
4267
4268
  };
4268
4269
  /**
4269
4270
  * Calculate a vector containing the largest components of the specified vectors.
@@ -4275,7 +4276,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4275
4276
  out._y = Math.max(left._y, right._y);
4276
4277
  out._z = Math.max(left._z, right._z);
4277
4278
  out._w = Math.max(left._w, right._w);
4278
- out._onValueChanged && out._onValueChanged();
4279
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
4279
4280
  };
4280
4281
  /**
4281
4282
  * Calculate a vector containing the smallest components of the specified vectors.
@@ -4287,7 +4288,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4287
4288
  out._y = Math.min(left._y, right._y);
4288
4289
  out._z = Math.min(left._z, right._z);
4289
4290
  out._w = Math.min(left._w, right._w);
4290
- out._onValueChanged && out._onValueChanged();
4291
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
4291
4292
  };
4292
4293
  /**
4293
4294
  * Reverses the direction of a given vector.
@@ -4298,7 +4299,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4298
4299
  out._y = -a._y;
4299
4300
  out._z = -a._z;
4300
4301
  out._w = -a._w;
4301
- out._onValueChanged && out._onValueChanged();
4302
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
4302
4303
  };
4303
4304
  /**
4304
4305
  * Converts the vector into a unit vector.
@@ -4313,7 +4314,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4313
4314
  out._y = _y * len;
4314
4315
  out._z = _z * len;
4315
4316
  out._w = _w * len;
4316
- out._onValueChanged && out._onValueChanged();
4317
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
4317
4318
  }
4318
4319
  };
4319
4320
  /**
@@ -4326,7 +4327,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4326
4327
  out._y = a._y * s;
4327
4328
  out._z = a._z * s;
4328
4329
  out._w = a._w * s;
4329
- out._onValueChanged && out._onValueChanged();
4330
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
4330
4331
  };
4331
4332
  /**
4332
4333
  * Performs a transformation using the given 4x4 matrix.
@@ -4340,7 +4341,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4340
4341
  out._y = _x * e[1] + _y * e[5] + _z * e[9] + _w * e[13];
4341
4342
  out._z = _x * e[2] + _y * e[6] + _z * e[10] + _w * e[14];
4342
4343
  out._w = _x * e[3] + _y * e[7] + _z * e[11] + _w * e[15];
4343
- out._onValueChanged && out._onValueChanged();
4344
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
4344
4345
  };
4345
4346
  /**
4346
4347
  * Performs a transformation using the given quaternion.
@@ -4363,7 +4364,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4363
4364
  out._y = iy * qw - iw * qy - iz * qx + ix * qz;
4364
4365
  out._z = iz * qw - iw * qz - ix * qy + iy * qx;
4365
4366
  out._w = w;
4366
- out._onValueChanged && out._onValueChanged();
4367
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
4367
4368
  };
4368
4369
  _create_class(Vector4, [
4369
4370
  {
@@ -4375,7 +4376,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4375
4376
  },
4376
4377
  set: function set(value) {
4377
4378
  this._x = value;
4378
- this._onValueChanged && this._onValueChanged();
4379
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4379
4380
  }
4380
4381
  },
4381
4382
  {
@@ -4387,7 +4388,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4387
4388
  },
4388
4389
  set: function set(value) {
4389
4390
  this._y = value;
4390
- this._onValueChanged && this._onValueChanged();
4391
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4391
4392
  }
4392
4393
  },
4393
4394
  {
@@ -4399,7 +4400,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4399
4400
  },
4400
4401
  set: function set(value) {
4401
4402
  this._z = value;
4402
- this._onValueChanged && this._onValueChanged();
4403
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4403
4404
  }
4404
4405
  },
4405
4406
  {
@@ -4411,18 +4412,14 @@ function _create_class(Constructor, protoProps, staticProps) {
4411
4412
  },
4412
4413
  set: function set(value) {
4413
4414
  this._w = value;
4414
- this._onValueChanged && this._onValueChanged();
4415
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4415
4416
  }
4416
4417
  }
4417
4418
  ]);
4418
4419
  return Vector4;
4419
4420
  }();
4420
- (function() {
4421
- /** @internal */ Vector4._zero = new Vector4(0.0, 0.0, 0.0, 0.0);
4422
- })();
4423
- (function() {
4424
- /** @internal */ Vector4._one = new Vector4(1.0, 1.0, 1.0, 1.0);
4425
- })();
4421
+ /** @internal */ Vector4._zero = new Vector4(0.0, 0.0, 0.0, 0.0);
4422
+ /** @internal */ Vector4._one = new Vector4(1.0, 1.0, 1.0, 1.0);
4426
4423
 
4427
4424
  /**
4428
4425
  * Describes a color in the from of RGBA (in order: R, G, B, A).
@@ -4451,7 +4448,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4451
4448
  this._g = g;
4452
4449
  this._b = b;
4453
4450
  this._a = a;
4454
- this._onValueChanged && this._onValueChanged();
4451
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4455
4452
  return this;
4456
4453
  };
4457
4454
  /**
@@ -4463,7 +4460,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4463
4460
  this._g += color._g;
4464
4461
  this._b += color._b;
4465
4462
  this._a += color._a;
4466
- this._onValueChanged && this._onValueChanged();
4463
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4467
4464
  return this;
4468
4465
  };
4469
4466
  /**
@@ -4475,7 +4472,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4475
4472
  this._g *= s;
4476
4473
  this._b *= s;
4477
4474
  this._a *= s;
4478
- this._onValueChanged && this._onValueChanged();
4475
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4479
4476
  return this;
4480
4477
  };
4481
4478
  /**
@@ -4494,10 +4491,21 @@ function _create_class(Constructor, protoProps, staticProps) {
4494
4491
  this._g = source.g;
4495
4492
  this._b = source.b;
4496
4493
  this._a = source.a;
4497
- this._onValueChanged && this._onValueChanged();
4494
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4498
4495
  return this;
4499
4496
  };
4500
4497
  /**
4498
+ * Copy to color like object.
4499
+ * @param target - Color like object.
4500
+ * @returns This Color like object
4501
+ */ _proto.copyTo = function copyTo(target) {
4502
+ target.r = this._r;
4503
+ target.g = this._g;
4504
+ target.b = this._b;
4505
+ target.a = this._a;
4506
+ return target;
4507
+ };
4508
+ /**
4501
4509
  * Copy from array like object.
4502
4510
  * @param source - Array like object
4503
4511
  * @param offset - The start offset
@@ -4508,7 +4516,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4508
4516
  this._g = source[offset + 1];
4509
4517
  this._b = source[offset + 2];
4510
4518
  this._a = source[offset + 3];
4511
- this._onValueChanged && this._onValueChanged();
4519
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4512
4520
  return this;
4513
4521
  };
4514
4522
  /**
@@ -4530,7 +4538,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4530
4538
  out._r = Color.gammaToLinearSpace(this._r);
4531
4539
  out._g = Color.gammaToLinearSpace(this._g);
4532
4540
  out._b = Color.gammaToLinearSpace(this._b);
4533
- this._onValueChanged && this._onValueChanged();
4541
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
4534
4542
  return out;
4535
4543
  };
4536
4544
  /**
@@ -4541,7 +4549,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4541
4549
  out._r = Color.linearToGammaSpace(this._r);
4542
4550
  out._g = Color.linearToGammaSpace(this._g);
4543
4551
  out._b = Color.linearToGammaSpace(this._b);
4544
- this._onValueChanged && this._onValueChanged();
4552
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
4545
4553
  return out;
4546
4554
  };
4547
4555
  /**
@@ -4613,7 +4621,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4613
4621
  out._g = left._g + right._g;
4614
4622
  out._b = left._b + right._b;
4615
4623
  out._a = left._a + right._a;
4616
- out._onValueChanged && out._onValueChanged();
4624
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
4617
4625
  return out;
4618
4626
  };
4619
4627
  /**
@@ -4626,7 +4634,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4626
4634
  out._g = left._g - right._g;
4627
4635
  out._b = left._b - right._b;
4628
4636
  out._a = left._a - right._a;
4629
- out._onValueChanged && out._onValueChanged();
4637
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
4630
4638
  };
4631
4639
  /**
4632
4640
  * Scale a color by the given value.
@@ -4639,7 +4647,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4639
4647
  out._g = left._g * s;
4640
4648
  out._b = left._b * s;
4641
4649
  out._a = left._a * s;
4642
- out._onValueChanged && out._onValueChanged();
4650
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
4643
4651
  return out;
4644
4652
  };
4645
4653
  /**
@@ -4654,7 +4662,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4654
4662
  out._g = _g + (end._g - _g) * t;
4655
4663
  out._b = _b + (end._b - _b) * t;
4656
4664
  out._a = _a + (end._a - _a) * t;
4657
- out._onValueChanged && out._onValueChanged();
4665
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
4658
4666
  return out;
4659
4667
  };
4660
4668
  _create_class(Color, [
@@ -4667,7 +4675,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4667
4675
  },
4668
4676
  set: function set(value) {
4669
4677
  this._r = value;
4670
- this._onValueChanged && this._onValueChanged();
4678
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4671
4679
  }
4672
4680
  },
4673
4681
  {
@@ -4679,7 +4687,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4679
4687
  },
4680
4688
  set: function set(value) {
4681
4689
  this._g = value;
4682
- this._onValueChanged && this._onValueChanged();
4690
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4683
4691
  }
4684
4692
  },
4685
4693
  {
@@ -4691,7 +4699,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4691
4699
  },
4692
4700
  set: function set(value) {
4693
4701
  this._b = value;
4694
- this._onValueChanged && this._onValueChanged();
4702
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4695
4703
  }
4696
4704
  },
4697
4705
  {
@@ -4703,7 +4711,7 @@ function _create_class(Constructor, protoProps, staticProps) {
4703
4711
  },
4704
4712
  set: function set(value) {
4705
4713
  this._a = value;
4706
- this._onValueChanged && this._onValueChanged();
4714
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4707
4715
  }
4708
4716
  }
4709
4717
  ]);
@@ -4736,7 +4744,7 @@ var Rect = /*#__PURE__*/ function() {
4736
4744
  this._y = y;
4737
4745
  this._width = width;
4738
4746
  this._height = height;
4739
- this._onValueChanged && this._onValueChanged();
4747
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4740
4748
  return this;
4741
4749
  };
4742
4750
  /**
@@ -4754,7 +4762,7 @@ var Rect = /*#__PURE__*/ function() {
4754
4762
  this._y = source.y;
4755
4763
  this._width = source.width;
4756
4764
  this._height = source.height;
4757
- this._onValueChanged && this._onValueChanged();
4765
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4758
4766
  return this;
4759
4767
  };
4760
4768
  _create_class(Rect, [
@@ -4767,7 +4775,7 @@ var Rect = /*#__PURE__*/ function() {
4767
4775
  },
4768
4776
  set: function set(value) {
4769
4777
  this._x = value;
4770
- this._onValueChanged && this._onValueChanged();
4778
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4771
4779
  }
4772
4780
  },
4773
4781
  {
@@ -4779,7 +4787,7 @@ var Rect = /*#__PURE__*/ function() {
4779
4787
  },
4780
4788
  set: function set(value) {
4781
4789
  this._y = value;
4782
- this._onValueChanged && this._onValueChanged();
4790
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4783
4791
  }
4784
4792
  },
4785
4793
  {
@@ -4791,7 +4799,7 @@ var Rect = /*#__PURE__*/ function() {
4791
4799
  },
4792
4800
  set: function set(value) {
4793
4801
  this._width = value;
4794
- this._onValueChanged && this._onValueChanged();
4802
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4795
4803
  }
4796
4804
  },
4797
4805
  {
@@ -4803,7 +4811,7 @@ var Rect = /*#__PURE__*/ function() {
4803
4811
  },
4804
4812
  set: function set(value) {
4805
4813
  this._height = value;
4806
- this._onValueChanged && this._onValueChanged();
4814
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
4807
4815
  }
4808
4816
  }
4809
4817
  ]);
@@ -5029,10 +5037,13 @@ exports.BoundingFrustum = BoundingFrustum;
5029
5037
  exports.BoundingSphere = BoundingSphere;
5030
5038
  exports.CollisionUtil = CollisionUtil;
5031
5039
  exports.Color = Color;
5040
+ exports.ContainmentType = ContainmentType;
5041
+ exports.FrustumFace = FrustumFace;
5032
5042
  exports.MathUtil = MathUtil;
5033
5043
  exports.Matrix = Matrix;
5034
5044
  exports.Matrix3x3 = Matrix3x3;
5035
5045
  exports.Plane = Plane;
5046
+ exports.PlaneIntersectionType = PlaneIntersectionType;
5036
5047
  exports.Quaternion = Quaternion;
5037
5048
  exports.Rand = Rand;
5038
5049
  exports.Ray = Ray;