@zhongguo168a/yxeditor-common 0.0.53 → 0.0.54
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.d.ts +4 -1
- package/dist/index.esm.js +7 -3
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1358,7 +1358,10 @@ declare class AssetLoader extends Dispatcher {
|
|
|
1358
1358
|
onComplete?: (err: any, asset: any) => void;
|
|
1359
1359
|
preload?: boolean;
|
|
1360
1360
|
}): this;
|
|
1361
|
-
|
|
1361
|
+
loadJson(uri: string, otherConfig?: {
|
|
1362
|
+
onComplete?: (err: any, asset: any) => void;
|
|
1363
|
+
preload?: boolean;
|
|
1364
|
+
}): this;
|
|
1362
1365
|
loadSpriteFrame(uri: string, otherConfig?: {
|
|
1363
1366
|
onComplete?: (err: any, asset: any) => void;
|
|
1364
1367
|
uuid?: string;
|
package/dist/index.esm.js
CHANGED
|
@@ -4571,10 +4571,14 @@ class AssetLoader extends Dispatcher {
|
|
|
4571
4571
|
this._loaderList.push(item);
|
|
4572
4572
|
return this;
|
|
4573
4573
|
}
|
|
4574
|
-
|
|
4574
|
+
loadJson(uri, otherConfig) {
|
|
4575
4575
|
let item = new LoaderItem();
|
|
4576
|
-
item.type = "
|
|
4576
|
+
item.type = "Json";
|
|
4577
4577
|
item.uri = new AssetURI(uri);
|
|
4578
|
+
if (otherConfig) {
|
|
4579
|
+
item.onComplete = otherConfig.onComplete;
|
|
4580
|
+
item.preload = otherConfig.preload != undefined ? otherConfig.preload : false;
|
|
4581
|
+
}
|
|
4578
4582
|
this._loaderList.push(item);
|
|
4579
4583
|
return this;
|
|
4580
4584
|
}
|
|
@@ -4642,7 +4646,7 @@ class AssetLoader extends Dispatcher {
|
|
|
4642
4646
|
});
|
|
4643
4647
|
break;
|
|
4644
4648
|
}
|
|
4645
|
-
case "
|
|
4649
|
+
case "Json": {
|
|
4646
4650
|
assetManager.loadBundle(item.uri.bundle, (err, bundle) => {
|
|
4647
4651
|
if (this._stop) {
|
|
4648
4652
|
return;
|