@galacean/engine-core 1.1.0-beta.18 → 1.1.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.
@@ -7747,6 +7747,7 @@ SimpleSpriteAssembler = __decorate([
7747
7747
  SpriteModifyFlags[SpriteModifyFlags["region"] = 0x20] = "region";
7748
7748
  SpriteModifyFlags[SpriteModifyFlags["pivot"] = 0x40] = "pivot";
7749
7749
  SpriteModifyFlags[SpriteModifyFlags["border"] = 0x80] = "border";
7750
+ SpriteModifyFlags[SpriteModifyFlags["destroy"] = 0x100] = "destroy";
7750
7751
  })(SpriteModifyFlags || (SpriteModifyFlags = {}));
7751
7752
 
7752
7753
  /**
@@ -13159,24 +13160,16 @@ var /** @internal */ PromiseState;
13159
13160
  return subResource;
13160
13161
  };
13161
13162
  _proto._parseURL = function _parseURL(path) {
13162
- var assetBaseURL = path;
13163
- var index = assetBaseURL.indexOf("?");
13164
- if (index !== -1) {
13165
- assetBaseURL = assetBaseURL.slice(0, index);
13166
- }
13163
+ var _path_split = path.split("?"), baseUrl = _path_split[0], searchStr = _path_split[1];
13164
+ var searchParams = new URLSearchParams(searchStr);
13165
+ var queryPath = searchParams.get("q");
13166
+ searchParams.delete("q");
13167
+ var assetBaseURL = searchParams.size > 0 ? baseUrl + "?" + searchParams.toString() : baseUrl;
13167
13168
  return {
13168
13169
  assetBaseURL: assetBaseURL,
13169
- queryPath: this._getParameterByName("q", path)
13170
+ queryPath: queryPath
13170
13171
  };
13171
13172
  };
13172
- _proto._getParameterByName = function _getParameterByName(name, url) {
13173
- if (url === void 0) url = engineMiniprogramAdapter.window.location.href;
13174
- name = name.replace(/[\[\]]/g, "\\$&");
13175
- var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), results = regex.exec(url);
13176
- if (!results) return null;
13177
- if (!results[2]) return "";
13178
- return decodeURIComponent(results[2].replace(/\+/g, " "));
13179
- };
13180
13173
  _proto._parseQueryPath = function _parseQueryPath(string) {
13181
13174
  var result = [];
13182
13175
  if (string.charCodeAt(0) === charCodeOfDot) {
@@ -16841,6 +16834,7 @@ exports.TextVerticalAlignment = void 0;
16841
16834
  /**
16842
16835
  * @internal
16843
16836
  */ _proto._onDestroy = function _onDestroy() {
16837
+ this._dispatchSpriteChange(SpriteModifyFlags.destroy);
16844
16838
  ReferResource1.prototype._onDestroy.call(this);
16845
16839
  this._positions.length = 0;
16846
16840
  this._positions = null;
@@ -17791,6 +17785,9 @@ var TiledType;
17791
17785
  case SpriteModifyFlags.pivot:
17792
17786
  this._dirtyUpdateFlag |= RendererUpdateFlags.WorldVolume;
17793
17787
  break;
17788
+ case SpriteModifyFlags.destroy:
17789
+ this.sprite = null;
17790
+ break;
17794
17791
  }
17795
17792
  };
17796
17793
  _create_class(SpriteRenderer, [
@@ -29126,7 +29123,7 @@ __decorate([
29126
29123
  var _this = this, main = _this.main, emission = _this.emission;
29127
29124
  var duration = main.duration;
29128
29125
  var lastPlayTime = this._playTime;
29129
- this._playTime += elapsedTime;
29126
+ this._playTime += elapsedTime * main.simulationSpeed;
29130
29127
  this._retireActiveParticles();
29131
29128
  this._freeRetiredParticles();
29132
29129
  if (emission.enabled && this._isPlaying) {
package/dist/module.js CHANGED
@@ -7742,6 +7742,7 @@ SimpleSpriteAssembler = __decorate([
7742
7742
  SpriteModifyFlags[SpriteModifyFlags["region"] = 0x20] = "region";
7743
7743
  SpriteModifyFlags[SpriteModifyFlags["pivot"] = 0x40] = "pivot";
7744
7744
  SpriteModifyFlags[SpriteModifyFlags["border"] = 0x80] = "border";
7745
+ SpriteModifyFlags[SpriteModifyFlags["destroy"] = 0x100] = "destroy";
7745
7746
  })(SpriteModifyFlags || (SpriteModifyFlags = {}));
7746
7747
 
7747
7748
  /**
@@ -13154,24 +13155,16 @@ var /** @internal */ PromiseState;
13154
13155
  return subResource;
13155
13156
  };
13156
13157
  _proto._parseURL = function _parseURL(path) {
13157
- var assetBaseURL = path;
13158
- var index = assetBaseURL.indexOf("?");
13159
- if (index !== -1) {
13160
- assetBaseURL = assetBaseURL.slice(0, index);
13161
- }
13158
+ var _path_split = path.split("?"), baseUrl = _path_split[0], searchStr = _path_split[1];
13159
+ var searchParams = new URLSearchParams(searchStr);
13160
+ var queryPath = searchParams.get("q");
13161
+ searchParams.delete("q");
13162
+ var assetBaseURL = searchParams.size > 0 ? baseUrl + "?" + searchParams.toString() : baseUrl;
13162
13163
  return {
13163
13164
  assetBaseURL: assetBaseURL,
13164
- queryPath: this._getParameterByName("q", path)
13165
+ queryPath: queryPath
13165
13166
  };
13166
13167
  };
13167
- _proto._getParameterByName = function _getParameterByName(name, url) {
13168
- if (url === void 0) url = window.location.href;
13169
- name = name.replace(/[\[\]]/g, "\\$&");
13170
- var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), results = regex.exec(url);
13171
- if (!results) return null;
13172
- if (!results[2]) return "";
13173
- return decodeURIComponent(results[2].replace(/\+/g, " "));
13174
- };
13175
13168
  _proto._parseQueryPath = function _parseQueryPath(string) {
13176
13169
  var result = [];
13177
13170
  if (string.charCodeAt(0) === charCodeOfDot) {
@@ -16836,6 +16829,7 @@ var TextVerticalAlignment;
16836
16829
  /**
16837
16830
  * @internal
16838
16831
  */ _proto._onDestroy = function _onDestroy() {
16832
+ this._dispatchSpriteChange(SpriteModifyFlags.destroy);
16839
16833
  ReferResource1.prototype._onDestroy.call(this);
16840
16834
  this._positions.length = 0;
16841
16835
  this._positions = null;
@@ -17786,6 +17780,9 @@ var TiledType;
17786
17780
  case SpriteModifyFlags.pivot:
17787
17781
  this._dirtyUpdateFlag |= RendererUpdateFlags.WorldVolume;
17788
17782
  break;
17783
+ case SpriteModifyFlags.destroy:
17784
+ this.sprite = null;
17785
+ break;
17789
17786
  }
17790
17787
  };
17791
17788
  _create_class(SpriteRenderer, [
@@ -29121,7 +29118,7 @@ __decorate([
29121
29118
  var _this = this, main = _this.main, emission = _this.emission;
29122
29119
  var duration = main.duration;
29123
29120
  var lastPlayTime = this._playTime;
29124
- this._playTime += elapsedTime;
29121
+ this._playTime += elapsedTime * main.simulationSpeed;
29125
29122
  this._retireActiveParticles();
29126
29123
  this._freeRetiredParticles();
29127
29124
  if (emission.enabled && this._isPlaying) {