@galacean/engine-loader 0.0.0-experimental-2.0-migrate.4 → 0.0.0-experimental-2.0-migrate.5
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 +3 -10
- package/dist/main.js.map +1 -1
- package/dist/module.js +3 -10
- package/dist/module.js.map +1 -1
- package/package.json +4 -4
package/dist/module.js
CHANGED
|
@@ -6538,10 +6538,6 @@ var SpriteAtlasLoader = /*#__PURE__*/ function(Loader) {
|
|
|
6538
6538
|
_proto.load = function load(item, resourceManager) {
|
|
6539
6539
|
var _this = this;
|
|
6540
6540
|
return new AssetPromise(function(resolve, reject, _, __, onCancel) {
|
|
6541
|
-
var _item_resolvedUrl;
|
|
6542
|
-
// Atlas pages are runtime files addressed relative to the encoded atlas,
|
|
6543
|
-
// not to the editor-facing virtual resource identity.
|
|
6544
|
-
var atlasUrl = (_item_resolvedUrl = item.resolvedUrl) != null ? _item_resolvedUrl : item.url;
|
|
6545
6541
|
var chainPromises = [];
|
|
6546
6542
|
onCancel(function() {
|
|
6547
6543
|
for(var i = 0; i < chainPromises.length; i++){
|
|
@@ -6549,7 +6545,7 @@ var SpriteAtlasLoader = /*#__PURE__*/ function(Loader) {
|
|
|
6549
6545
|
}
|
|
6550
6546
|
});
|
|
6551
6547
|
// @ts-ignore
|
|
6552
|
-
var configPromise = resourceManager._request(
|
|
6548
|
+
var configPromise = resourceManager._request(item.url, _extends({}, item, {
|
|
6553
6549
|
type: "json"
|
|
6554
6550
|
}));
|
|
6555
6551
|
chainPromises.push(configPromise);
|
|
@@ -6559,7 +6555,7 @@ var SpriteAtlasLoader = /*#__PURE__*/ function(Loader) {
|
|
|
6559
6555
|
if (atlasItem.img) {
|
|
6560
6556
|
var _atlasItem_type;
|
|
6561
6557
|
chainPromises.push(resourceManager.load({
|
|
6562
|
-
url: Utils.resolveAbsoluteUrl(
|
|
6558
|
+
url: Utils.resolveAbsoluteUrl(item.url, atlasItem.img),
|
|
6563
6559
|
type: (_atlasItem_type = atlasItem.type) != null ? _atlasItem_type : AssetType.Texture,
|
|
6564
6560
|
params: {
|
|
6565
6561
|
format: format,
|
|
@@ -6902,10 +6898,7 @@ var ShaderLoader = /*#__PURE__*/ function(Loader) {
|
|
|
6902
6898
|
}
|
|
6903
6899
|
var _proto = ShaderLoader.prototype;
|
|
6904
6900
|
_proto.load = function load(item, resourceManager) {
|
|
6905
|
-
var
|
|
6906
|
-
// Virtual paths preserve source identity (for example `.shader`), while
|
|
6907
|
-
// the physical path determines how this file is encoded (`.shaderc`).
|
|
6908
|
-
var url = (_item_resolvedUrl = item.resolvedUrl) != null ? _item_resolvedUrl : item.url;
|
|
6901
|
+
var url = item.url;
|
|
6909
6902
|
if (url.endsWith(".shaderc")) {
|
|
6910
6903
|
// @ts-ignore
|
|
6911
6904
|
return resourceManager._request(url, _extends({}, item, {
|