@ives_xxz/framework 2.3.13 → 2.3.15
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/manager/FWAssetManager.ts +4 -2
- package/manager/FWResManager.ts +2 -1
- package/package.json +1 -1
- package/types/FW.d.ts +1 -0
|
@@ -58,7 +58,9 @@ export class FWAssetManager extends FWManager implements FW.AssetManager {
|
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
60
|
const fileName = FW.Entry.utils.getFileName(img);
|
|
61
|
-
const texture: cc.Texture2D = await this.loadRemote(img
|
|
61
|
+
const texture: cc.Texture2D = await this.loadRemote(img, {
|
|
62
|
+
ext: '.png',
|
|
63
|
+
});
|
|
62
64
|
var asset = new sp.SkeletonData();
|
|
63
65
|
asset.atlasText = assets[0];
|
|
64
66
|
asset.skeletonJson = assets[1];
|
|
@@ -100,7 +102,7 @@ export class FWAssetManager extends FWManager implements FW.AssetManager {
|
|
|
100
102
|
if (err || !asset) {
|
|
101
103
|
reject(err);
|
|
102
104
|
}
|
|
103
|
-
options
|
|
105
|
+
options?.cb?.(asset as T);
|
|
104
106
|
resolve(asset as T);
|
|
105
107
|
},
|
|
106
108
|
);
|
package/manager/FWResManager.ts
CHANGED
|
@@ -97,12 +97,13 @@ export class FWResManager extends FWManager implements FW.ResManager {
|
|
|
97
97
|
ext?: string;
|
|
98
98
|
enableCache?: boolean;
|
|
99
99
|
maxRetryCount?: number;
|
|
100
|
+
texture?: boolean;
|
|
100
101
|
cb?: (asset: T) => void;
|
|
101
102
|
},
|
|
102
103
|
): Promise<T> {
|
|
103
104
|
try {
|
|
104
105
|
const asset = await this.assetMgr.loadRemote(url, options);
|
|
105
|
-
if (options?.
|
|
106
|
+
if (!options?.texture) {
|
|
106
107
|
return asset as T;
|
|
107
108
|
} else {
|
|
108
109
|
if (asset instanceof cc.Texture2D) {
|
package/package.json
CHANGED