@galacean/engine-core 1.4.0-alpha.2 → 1.4.0-alpha.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/main.js CHANGED
@@ -19496,8 +19496,8 @@ var MultiExecutor = /*#__PURE__*/ function() {
19496
19496
  this._subAssetPromiseCallbacks = {};
19497
19497
  this.//-----------------Editor temp solution-----------------
19498
19498
  /** @internal */ _objectPool = Object.create(null);
19499
- this./** @internal */ _editorResourceConfig = Object.create(null);
19500
- this./** @internal */ _virtualPathMap = Object.create(null);
19499
+ this./** @internal */ _idResourceMap = Object.create(null);
19500
+ this./** @internal */ _virtualPathResourceMap = Object.create(null);
19501
19501
  }
19502
19502
  var _proto = ResourceManager.prototype;
19503
19503
  _proto.load = function load(assetInfo) {
@@ -19574,8 +19574,9 @@ var MultiExecutor = /*#__PURE__*/ function() {
19574
19574
  /**
19575
19575
  * @internal
19576
19576
  */ _proto._getRemoteUrl = function _getRemoteUrl(url) {
19577
- var _this__virtualPathMap_url;
19578
- return (_this__virtualPathMap_url = this._virtualPathMap[url]) != null ? _this__virtualPathMap_url : url;
19577
+ var _this__virtualPathResourceMap_url;
19578
+ var _this__virtualPathResourceMap_url_path;
19579
+ return (_this__virtualPathResourceMap_url_path = (_this__virtualPathResourceMap_url = this._virtualPathResourceMap[url]) == null ? void 0 : _this__virtualPathResourceMap_url.path) != null ? _this__virtualPathResourceMap_url_path : url;
19579
19580
  };
19580
19581
  /**
19581
19582
  * @internal
@@ -19591,9 +19592,9 @@ var MultiExecutor = /*#__PURE__*/ function() {
19591
19592
  /**
19592
19593
  * @internal
19593
19594
  */ _proto._onSubAssetSuccess = function _onSubAssetSuccess(assetBaseURL, assetSubPath, value) {
19594
- var _this__subAssetPromiseCallbacks_remoteAssetBaseURL;
19595
- var _this__virtualPathMap_assetBaseURL;
19596
- var remoteAssetBaseURL = (_this__virtualPathMap_assetBaseURL = this._virtualPathMap[assetBaseURL]) != null ? _this__virtualPathMap_assetBaseURL : assetBaseURL;
19595
+ var _this__virtualPathResourceMap_assetBaseURL, _this__subAssetPromiseCallbacks_remoteAssetBaseURL;
19596
+ var _this__virtualPathResourceMap_assetBaseURL_path;
19597
+ var remoteAssetBaseURL = (_this__virtualPathResourceMap_assetBaseURL_path = (_this__virtualPathResourceMap_assetBaseURL = this._virtualPathResourceMap[assetBaseURL]) == null ? void 0 : _this__virtualPathResourceMap_assetBaseURL.path) != null ? _this__virtualPathResourceMap_assetBaseURL_path : assetBaseURL;
19597
19598
  var subPromiseCallback = (_this__subAssetPromiseCallbacks_remoteAssetBaseURL = this._subAssetPromiseCallbacks[remoteAssetBaseURL]) == null ? void 0 : _this__subAssetPromiseCallbacks_remoteAssetBaseURL[assetSubPath];
19598
19599
  if (subPromiseCallback) {
19599
19600
  subPromiseCallback.resolve(value);
@@ -19719,6 +19720,7 @@ var MultiExecutor = /*#__PURE__*/ function() {
19719
19720
  };
19720
19721
  _proto._loadSingleItem = function _loadSingleItem(itemOrURL) {
19721
19722
  var _this = this;
19723
+ var _this__virtualPathResourceMap_assetBaseURL;
19722
19724
  var item = this._assignDefaultOptions(typeof itemOrURL === "string" ? {
19723
19725
  url: itemOrURL
19724
19726
  } : itemOrURL);
@@ -19728,9 +19730,9 @@ var MultiExecutor = /*#__PURE__*/ function() {
19728
19730
  // Parse url
19729
19731
  var _this__parseURL = this._parseURL(url), assetBaseURL = _this__parseURL.assetBaseURL, queryPath = _this__parseURL.queryPath;
19730
19732
  var paths = queryPath ? this._parseQueryPath(queryPath) : [];
19731
- var _this__virtualPathMap_assetBaseURL;
19733
+ var _this__virtualPathResourceMap_assetBaseURL_path;
19732
19734
  // Get remote asset base url
19733
- var remoteAssetBaseURL = (_this__virtualPathMap_assetBaseURL = this._virtualPathMap[assetBaseURL]) != null ? _this__virtualPathMap_assetBaseURL : assetBaseURL;
19735
+ var remoteAssetBaseURL = (_this__virtualPathResourceMap_assetBaseURL_path = (_this__virtualPathResourceMap_assetBaseURL = this._virtualPathResourceMap[assetBaseURL]) == null ? void 0 : _this__virtualPathResourceMap_assetBaseURL.path) != null ? _this__virtualPathResourceMap_assetBaseURL_path : assetBaseURL;
19734
19736
  // Check cache
19735
19737
  var cacheObject = this._assetUrlPool[remoteAssetBaseURL];
19736
19738
  if (cacheObject) {
@@ -19895,9 +19897,9 @@ var MultiExecutor = /*#__PURE__*/ function() {
19895
19897
  if (obj) {
19896
19898
  promise = Promise.resolve(obj);
19897
19899
  } else {
19898
- var resourceConfig = this._editorResourceConfig[refId];
19900
+ var resourceConfig = this._idResourceMap[refId];
19899
19901
  if (!resourceConfig) {
19900
- Logger.warn("refId:" + refId + " is not find in this._editorResourceConfig.");
19902
+ Logger.warn("refId:" + refId + " is not find in this._idResourceMap.");
19901
19903
  return Promise.resolve(null);
19902
19904
  }
19903
19905
  var url = resourceConfig.virtualPath;
@@ -19919,8 +19921,11 @@ var MultiExecutor = /*#__PURE__*/ function() {
19919
19921
  */ _proto.initVirtualResources = function initVirtualResources(config) {
19920
19922
  var _this = this;
19921
19923
  config.forEach(function(element) {
19922
- _this._virtualPathMap[element.virtualPath] = element.path;
19923
- _this._editorResourceConfig[element.id] = element;
19924
+ _this._virtualPathResourceMap[element.virtualPath] = element;
19925
+ _this._idResourceMap[element.id] = element;
19926
+ if (element.dependentAssetMap) {
19927
+ _this._virtualPathResourceMap[element.virtualPath].dependentAssetMap = element.dependentAssetMap;
19928
+ }
19924
19929
  });
19925
19930
  };
19926
19931
  /**