@galacean/engine 1.4.2 → 1.4.3

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/browser.js CHANGED
@@ -8509,7 +8509,6 @@
8509
8509
  this._bounds = null;
8510
8510
  this._atlas = null;
8511
8511
  this._texture = null;
8512
- this._updateFlagManager = null;
8513
8512
  };
8514
8513
  _proto._calDefaultSize = function _calDefaultSize() {
8515
8514
  if (this._texture) {
@@ -22478,8 +22477,8 @@
22478
22477
  }
22479
22478
  this._parent = null;
22480
22479
  this._siblingIndex = -1;
22480
+ this._dispatchModify(EntityModifyFlags.Child, oldParent);
22481
22481
  }
22482
- this._dispatchModify(EntityModifyFlags.Child, oldParent);
22483
22482
  };
22484
22483
  /**
22485
22484
  * @internal
@@ -22583,6 +22582,10 @@
22583
22582
  }
22584
22583
  }
22585
22584
  this._setParentChange();
22585
+ } else {
22586
+ if (parent && siblingIndex !== undefined) {
22587
+ this.siblingIndex = siblingIndex;
22588
+ }
22586
22589
  }
22587
22590
  };
22588
22591
  _proto._getComponentsInChildren = function _getComponentsInChildren(type, results) {
@@ -43894,11 +43897,11 @@
43894
43897
  }
43895
43898
  /**
43896
43899
  * The Prefab resource.
43897
- */ var PrefabResource = /*#__PURE__*/ function(ReferResource) {
43898
- _inherits(PrefabResource, ReferResource);
43900
+ */ var PrefabResource = /*#__PURE__*/ function(ReferResource1) {
43901
+ _inherits(PrefabResource, ReferResource1);
43899
43902
  function PrefabResource(engine, url) {
43900
43903
  var _this;
43901
- _this = ReferResource.call(this, engine) || this, _this.url = url, _this._dependenceAssets = new Set();
43904
+ _this = ReferResource1.call(this, engine) || this, _this.url = url, _this._dependenceAssets = new Set();
43902
43905
  return _this;
43903
43906
  }
43904
43907
  var _proto = PrefabResource.prototype;
@@ -43913,16 +43916,23 @@
43913
43916
  * @internal
43914
43917
  */ _proto._addDependenceAsset = function _addDependenceAsset(resource) {
43915
43918
  this._dependenceAssets.add(resource);
43916
- // @ts-ignore
43917
- resource._associationSuperResource(this);
43919
+ // @todo: The PhysicsMaterial does not inherit from ReferResource. Currently,
43920
+ // ReferResource requires the engine to be passed as a parameter, which prevents cross-engine reuse.
43921
+ // A refactor of ReferResource will be needed in the future.
43922
+ if (_instanceof1(resource, ReferResource)) {
43923
+ // @ts-ignore
43924
+ resource._associationSuperResource(this);
43925
+ }
43918
43926
  };
43919
43927
  _proto._onDestroy = function _onDestroy() {
43920
43928
  var _this = this;
43921
- ReferResource.prototype._onDestroy.call(this);
43929
+ ReferResource1.prototype._onDestroy.call(this);
43922
43930
  this._root.destroy();
43923
43931
  this._dependenceAssets.forEach(function(asset) {
43924
- // @ts-ignore
43925
- asset._disassociationSuperResource(_this);
43932
+ if (_instanceof1(asset, ReferResource)) {
43933
+ // @ts-ignore
43934
+ asset._disassociationSuperResource(_this);
43935
+ }
43926
43936
  });
43927
43937
  };
43928
43938
  return PrefabResource;
@@ -49973,8 +49983,8 @@
49973
49983
  ], EXT_texture_webp);
49974
49984
 
49975
49985
  //@ts-ignore
49976
- var version = "1.4.2";
49977
- console.log("Galacean engine version: " + version);
49986
+ var version = "1.4.3";
49987
+ console.log("Galacean Engine Version: " + version);
49978
49988
  for(var key in CoreObjects){
49979
49989
  Loader.registerClass(key, CoreObjects[key]);
49980
49990
  }