@galacean/engine-math 1.3.19 → 1.3.20

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
@@ -288,6 +288,16 @@ function _create_class(Constructor, protoProps, staticProps) {
288
288
  return this;
289
289
  };
290
290
  /**
291
+ * Copy to vector3 like object.
292
+ * @param target - Vector3 like object
293
+ * @returns This Vector3 like object
294
+ */ _proto.copyTo = function copyTo(target) {
295
+ target.x = this._x;
296
+ target.y = this._y;
297
+ target.z = this._z;
298
+ return target;
299
+ };
300
+ /**
291
301
  * Copy the value of this vector from an array.
292
302
  * @param array - The array
293
303
  * @param offset - The start offset of the array
@@ -2213,6 +2223,17 @@ function _create_class(Constructor, protoProps, staticProps) {
2213
2223
  return this;
2214
2224
  };
2215
2225
  /**
2226
+ * Copy this quaternion to the specified quaternion.
2227
+ * @param target - The specified quaternion
2228
+ * @returns This specified quaternion
2229
+ */ _proto.copyTo = function copyTo(target) {
2230
+ target.x = this._x;
2231
+ target.y = this._y;
2232
+ target.z = this._z;
2233
+ target.w = this._w;
2234
+ return target;
2235
+ };
2236
+ /**
2216
2237
  * Copy the value of this quaternion from an array.
2217
2238
  * @param array - The array
2218
2239
  * @param offset - The start offset of the array
@@ -3781,6 +3802,15 @@ function _create_class(Constructor, protoProps, staticProps) {
3781
3802
  return this;
3782
3803
  };
3783
3804
  /**
3805
+ * Copy to vector2 like object.
3806
+ * @param target - Vector2 like object
3807
+ * @returns This Vector2 like object
3808
+ */ _proto.copyTo = function copyTo(target) {
3809
+ target.x = this._x;
3810
+ target.y = this._y;
3811
+ return target;
3812
+ };
3813
+ /**
3784
3814
  * Copy the value of this vector from an array.
3785
3815
  * @param array - The array
3786
3816
  * @param offset - The start offset of the array
@@ -4128,6 +4158,17 @@ function _create_class(Constructor, protoProps, staticProps) {
4128
4158
  return this;
4129
4159
  };
4130
4160
  /**
4161
+ * Copy to vector4 like object.
4162
+ * @param target - Vector4 like object
4163
+ * @returns This Vector4 like object
4164
+ */ _proto.copyTo = function copyTo(target) {
4165
+ target.x = this._x;
4166
+ target.y = this._y;
4167
+ target.z = this._z;
4168
+ target.w = this._w;
4169
+ return target;
4170
+ };
4171
+ /**
4131
4172
  * Copy the value of this vector by an array.
4132
4173
  * @param array - The array
4133
4174
  * @param offset - The start offset of the array
@@ -4498,6 +4539,17 @@ function _create_class(Constructor, protoProps, staticProps) {
4498
4539
  return this;
4499
4540
  };
4500
4541
  /**
4542
+ * Copy to color like object.
4543
+ * @param target - Color like object.
4544
+ * @returns This Color like object
4545
+ */ _proto.copyTo = function copyTo(target) {
4546
+ target.r = this._r;
4547
+ target.g = this._g;
4548
+ target.b = this._b;
4549
+ target.a = this._a;
4550
+ return target;
4551
+ };
4552
+ /**
4501
4553
  * Copy from array like object.
4502
4554
  * @param source - Array like object
4503
4555
  * @param offset - The start offset