@galacean/engine-math 1.3.19 → 1.3.21

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.
@@ -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
package/dist/module.js CHANGED
@@ -284,6 +284,16 @@ function _create_class(Constructor, protoProps, staticProps) {
284
284
  return this;
285
285
  };
286
286
  /**
287
+ * Copy to vector3 like object.
288
+ * @param target - Vector3 like object
289
+ * @returns This Vector3 like object
290
+ */ _proto.copyTo = function copyTo(target) {
291
+ target.x = this._x;
292
+ target.y = this._y;
293
+ target.z = this._z;
294
+ return target;
295
+ };
296
+ /**
287
297
  * Copy the value of this vector from an array.
288
298
  * @param array - The array
289
299
  * @param offset - The start offset of the array
@@ -2209,6 +2219,17 @@ function _create_class(Constructor, protoProps, staticProps) {
2209
2219
  return this;
2210
2220
  };
2211
2221
  /**
2222
+ * Copy this quaternion to the specified quaternion.
2223
+ * @param target - The specified quaternion
2224
+ * @returns This specified quaternion
2225
+ */ _proto.copyTo = function copyTo(target) {
2226
+ target.x = this._x;
2227
+ target.y = this._y;
2228
+ target.z = this._z;
2229
+ target.w = this._w;
2230
+ return target;
2231
+ };
2232
+ /**
2212
2233
  * Copy the value of this quaternion from an array.
2213
2234
  * @param array - The array
2214
2235
  * @param offset - The start offset of the array
@@ -3777,6 +3798,15 @@ function _create_class(Constructor, protoProps, staticProps) {
3777
3798
  return this;
3778
3799
  };
3779
3800
  /**
3801
+ * Copy to vector2 like object.
3802
+ * @param target - Vector2 like object
3803
+ * @returns This Vector2 like object
3804
+ */ _proto.copyTo = function copyTo(target) {
3805
+ target.x = this._x;
3806
+ target.y = this._y;
3807
+ return target;
3808
+ };
3809
+ /**
3780
3810
  * Copy the value of this vector from an array.
3781
3811
  * @param array - The array
3782
3812
  * @param offset - The start offset of the array
@@ -4124,6 +4154,17 @@ function _create_class(Constructor, protoProps, staticProps) {
4124
4154
  return this;
4125
4155
  };
4126
4156
  /**
4157
+ * Copy to vector4 like object.
4158
+ * @param target - Vector4 like object
4159
+ * @returns This Vector4 like object
4160
+ */ _proto.copyTo = function copyTo(target) {
4161
+ target.x = this._x;
4162
+ target.y = this._y;
4163
+ target.z = this._z;
4164
+ target.w = this._w;
4165
+ return target;
4166
+ };
4167
+ /**
4127
4168
  * Copy the value of this vector by an array.
4128
4169
  * @param array - The array
4129
4170
  * @param offset - The start offset of the array
@@ -4494,6 +4535,17 @@ function _create_class(Constructor, protoProps, staticProps) {
4494
4535
  return this;
4495
4536
  };
4496
4537
  /**
4538
+ * Copy to color like object.
4539
+ * @param target - Color like object.
4540
+ * @returns This Color like object
4541
+ */ _proto.copyTo = function copyTo(target) {
4542
+ target.r = this._r;
4543
+ target.g = this._g;
4544
+ target.b = this._b;
4545
+ target.a = this._a;
4546
+ return target;
4547
+ };
4548
+ /**
4497
4549
  * Copy from array like object.
4498
4550
  * @param source - Array like object
4499
4551
  * @param offset - The start offset