@zhongguo168a/yxeditor-common 0.0.81 → 0.0.83
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/index.esm.js +20 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -5063,7 +5063,26 @@ class AssetLoader extends Dispatcher {
|
|
|
5063
5063
|
if (this._stop) {
|
|
5064
5064
|
return;
|
|
5065
5065
|
}
|
|
5066
|
-
|
|
5066
|
+
let lastAsset;
|
|
5067
|
+
switch (item.type) {
|
|
5068
|
+
case "Texture2D": {
|
|
5069
|
+
const texture = new Texture2D();
|
|
5070
|
+
texture.image = asset;
|
|
5071
|
+
lastAsset = texture;
|
|
5072
|
+
break;
|
|
5073
|
+
}
|
|
5074
|
+
case "SpriteFrame": {
|
|
5075
|
+
const texture = new Texture2D();
|
|
5076
|
+
texture.image = asset;
|
|
5077
|
+
const spriteFrame = new SpriteFrame();
|
|
5078
|
+
spriteFrame.texture = texture;
|
|
5079
|
+
lastAsset = spriteFrame;
|
|
5080
|
+
break;
|
|
5081
|
+
}
|
|
5082
|
+
default:
|
|
5083
|
+
lastAsset = asset;
|
|
5084
|
+
}
|
|
5085
|
+
onComplate(err, lastAsset);
|
|
5067
5086
|
});
|
|
5068
5087
|
}
|
|
5069
5088
|
}
|