@galacean/engine 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/browser.js +19 -14
- package/dist/browser.js.map +1 -1
- package/dist/browser.min.js +1 -1
- package/dist/browser.min.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/module.js +1 -1
- package/package.json +5 -5
package/dist/browser.js
CHANGED
|
@@ -24305,8 +24305,8 @@
|
|
|
24305
24305
|
this._contentRestorerPool = Object.create(null);
|
|
24306
24306
|
this._subAssetPromiseCallbacks = {};
|
|
24307
24307
|
this./** @internal */ _objectPool = Object.create(null);
|
|
24308
|
-
this./** @internal */
|
|
24309
|
-
this./** @internal */
|
|
24308
|
+
this./** @internal */ _idResourceMap = Object.create(null);
|
|
24309
|
+
this./** @internal */ _virtualPathResourceMap = Object.create(null);
|
|
24310
24310
|
}
|
|
24311
24311
|
var _proto = ResourceManager.prototype;
|
|
24312
24312
|
_proto.load = function load(assetInfo) {
|
|
@@ -24383,8 +24383,9 @@
|
|
|
24383
24383
|
/**
|
|
24384
24384
|
* @internal
|
|
24385
24385
|
*/ _proto._getRemoteUrl = function _getRemoteUrl(url) {
|
|
24386
|
-
var
|
|
24387
|
-
|
|
24386
|
+
var _this__virtualPathResourceMap_url;
|
|
24387
|
+
var _this__virtualPathResourceMap_url_path;
|
|
24388
|
+
return (_this__virtualPathResourceMap_url_path = (_this__virtualPathResourceMap_url = this._virtualPathResourceMap[url]) == null ? void 0 : _this__virtualPathResourceMap_url.path) != null ? _this__virtualPathResourceMap_url_path : url;
|
|
24388
24389
|
};
|
|
24389
24390
|
/**
|
|
24390
24391
|
* @internal
|
|
@@ -24400,9 +24401,9 @@
|
|
|
24400
24401
|
/**
|
|
24401
24402
|
* @internal
|
|
24402
24403
|
*/ _proto._onSubAssetSuccess = function _onSubAssetSuccess(assetBaseURL, assetSubPath, value) {
|
|
24403
|
-
var _this__subAssetPromiseCallbacks_remoteAssetBaseURL;
|
|
24404
|
-
var
|
|
24405
|
-
var remoteAssetBaseURL = (
|
|
24404
|
+
var _this__virtualPathResourceMap_assetBaseURL, _this__subAssetPromiseCallbacks_remoteAssetBaseURL;
|
|
24405
|
+
var _this__virtualPathResourceMap_assetBaseURL_path;
|
|
24406
|
+
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;
|
|
24406
24407
|
var subPromiseCallback = (_this__subAssetPromiseCallbacks_remoteAssetBaseURL = this._subAssetPromiseCallbacks[remoteAssetBaseURL]) == null ? void 0 : _this__subAssetPromiseCallbacks_remoteAssetBaseURL[assetSubPath];
|
|
24407
24408
|
if (subPromiseCallback) {
|
|
24408
24409
|
subPromiseCallback.resolve(value);
|
|
@@ -24526,6 +24527,7 @@
|
|
|
24526
24527
|
};
|
|
24527
24528
|
_proto._loadSingleItem = function _loadSingleItem(itemOrURL) {
|
|
24528
24529
|
var _this = this;
|
|
24530
|
+
var _this__virtualPathResourceMap_assetBaseURL;
|
|
24529
24531
|
var item = this._assignDefaultOptions(typeof itemOrURL === "string" ? {
|
|
24530
24532
|
url: itemOrURL
|
|
24531
24533
|
} : itemOrURL);
|
|
@@ -24535,9 +24537,9 @@
|
|
|
24535
24537
|
// Parse url
|
|
24536
24538
|
var _this__parseURL = this._parseURL(url), assetBaseURL = _this__parseURL.assetBaseURL, queryPath = _this__parseURL.queryPath;
|
|
24537
24539
|
var paths = queryPath ? this._parseQueryPath(queryPath) : [];
|
|
24538
|
-
var
|
|
24540
|
+
var _this__virtualPathResourceMap_assetBaseURL_path;
|
|
24539
24541
|
// Get remote asset base url
|
|
24540
|
-
var remoteAssetBaseURL = (
|
|
24542
|
+
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;
|
|
24541
24543
|
// Check cache
|
|
24542
24544
|
var cacheObject = this._assetUrlPool[remoteAssetBaseURL];
|
|
24543
24545
|
if (cacheObject) {
|
|
@@ -24702,9 +24704,9 @@
|
|
|
24702
24704
|
if (obj) {
|
|
24703
24705
|
promise = Promise.resolve(obj);
|
|
24704
24706
|
} else {
|
|
24705
|
-
var resourceConfig = this.
|
|
24707
|
+
var resourceConfig = this._idResourceMap[refId];
|
|
24706
24708
|
if (!resourceConfig) {
|
|
24707
|
-
Logger.warn("refId:" + refId + " is not find in this.
|
|
24709
|
+
Logger.warn("refId:" + refId + " is not find in this._idResourceMap.");
|
|
24708
24710
|
return Promise.resolve(null);
|
|
24709
24711
|
}
|
|
24710
24712
|
var url = resourceConfig.virtualPath;
|
|
@@ -24726,8 +24728,11 @@
|
|
|
24726
24728
|
*/ _proto.initVirtualResources = function initVirtualResources(config) {
|
|
24727
24729
|
var _this = this;
|
|
24728
24730
|
config.forEach(function(element) {
|
|
24729
|
-
_this.
|
|
24730
|
-
_this.
|
|
24731
|
+
_this._virtualPathResourceMap[element.virtualPath] = element;
|
|
24732
|
+
_this._idResourceMap[element.id] = element;
|
|
24733
|
+
if (element.dependentAssetMap) {
|
|
24734
|
+
_this._virtualPathResourceMap[element.virtualPath].dependentAssetMap = element.dependentAssetMap;
|
|
24735
|
+
}
|
|
24731
24736
|
});
|
|
24732
24737
|
};
|
|
24733
24738
|
/**
|
|
@@ -49440,7 +49445,7 @@
|
|
|
49440
49445
|
], EXT_texture_webp);
|
|
49441
49446
|
|
|
49442
49447
|
//@ts-ignore
|
|
49443
|
-
var version = "1.4.0-alpha.
|
|
49448
|
+
var version = "1.4.0-alpha.3";
|
|
49444
49449
|
console.log("Galacean engine version: " + version);
|
|
49445
49450
|
for(var key in CoreObjects){
|
|
49446
49451
|
Loader.registerClass(key, CoreObjects[key]);
|