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