@galacean/engine-core 1.0.0-beta.18 → 1.0.0-beta.19

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
@@ -375,28 +375,33 @@ function _inherits(subClass, superClass) {
375
375
  return Color;
376
376
  }();
377
377
 
378
- /******************************************************************************
379
- Copyright (c) Microsoft Corporation.
380
-
381
- Permission to use, copy, modify, and/or distribute this software for any
382
- purpose with or without fee is hereby granted.
383
-
384
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
385
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
386
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
387
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
388
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
389
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
390
- PERFORMANCE OF THIS SOFTWARE.
391
- ***************************************************************************** */
392
-
393
- function __decorate(decorators, target, key, desc) {
394
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
395
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
396
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
397
- return c > 3 && r && Object.defineProperty(target, key, r), r;
378
+ /******************************************************************************
379
+ Copyright (c) Microsoft Corporation.
380
+
381
+ Permission to use, copy, modify, and/or distribute this software for any
382
+ purpose with or without fee is hereby granted.
383
+
384
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
385
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
386
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
387
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
388
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
389
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
390
+ PERFORMANCE OF THIS SOFTWARE.
391
+ ***************************************************************************** */
392
+
393
+ function __decorate(decorators, target, key, desc) {
394
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
395
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
396
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
397
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
398
398
  }
399
399
 
400
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
401
+ var e = new Error(message);
402
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
403
+ };
404
+
400
405
  function _instanceof(left, right) {
401
406
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
402
407
  return !!right[Symbol.hasInstance](left);
@@ -3954,6 +3959,23 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
3954
3959
  scale.z < 0 && (isInvert = !isInvert);
3955
3960
  return isInvert;
3956
3961
  };
3962
+ _proto._onDestroy = function _onDestroy() {
3963
+ Component.prototype._onDestroy.call(this);
3964
+ //@ts-ignore
3965
+ this._worldPosition._onValueChanged = null;
3966
+ //@ts-ignore
3967
+ this._rotation._onValueChanged = null;
3968
+ //@ts-ignore
3969
+ this._worldRotation._onValueChanged = null;
3970
+ //@ts-ignore
3971
+ this._rotationQuaternion._onValueChanged = null;
3972
+ //@ts-ignore
3973
+ this._worldRotationQuaternion._onValueChanged = null;
3974
+ //@ts-ignore
3975
+ this._position._onValueChanged = null;
3976
+ //@ts-ignore
3977
+ this._scale._onValueChanged = null;
3978
+ };
3957
3979
  /**
3958
3980
  * Get worldMatrix: Will trigger the worldMatrix update of itself and all parent entities.
3959
3981
  * Get worldPosition: Will trigger the worldMatrix, local position update of itself and the worldMatrix update of all parent entities.
@@ -4647,6 +4669,7 @@ var ComponentCloner = /*#__PURE__*/ function() {
4647
4669
  return component;
4648
4670
  }
4649
4671
  }
4672
+ return null;
4650
4673
  };
4651
4674
  /**
4652
4675
  * Get components which match the type.