@zhongguo168a/yxeditor-common 0.0.80 → 0.0.81
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 +20 -2
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1509,6 +1509,9 @@ declare class AssetLoader extends Dispatcher {
|
|
|
1509
1509
|
onComplete?: (err: any, asset: any) => void;
|
|
1510
1510
|
uuid?: string;
|
|
1511
1511
|
}): this;
|
|
1512
|
+
loadTexture2D(uri: string, otherConfig?: {
|
|
1513
|
+
onComplete?: (err: any, asset: any) => void;
|
|
1514
|
+
}): this;
|
|
1512
1515
|
loadImageAsset(uri: string, otherConfig?: {
|
|
1513
1516
|
onComplete?: (err: any, asset: any) => void;
|
|
1514
1517
|
}): this;
|
|
@@ -1813,7 +1816,7 @@ declare const enum GeometryDirection {
|
|
|
1813
1816
|
NorthWest = 5,
|
|
1814
1817
|
North = 6,
|
|
1815
1818
|
NorthEast = 7,
|
|
1816
|
-
Any =
|
|
1819
|
+
Any = 255
|
|
1817
1820
|
}
|
|
1818
1821
|
declare const enum DirectionMode {
|
|
1819
1822
|
任意 = 0,
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HorizontalTextAlignment, VerticalTextAlignment, director, macro, Scheduler, math, instantiate, _decorator, Component, SpriteAtlas, Size, Vec2, Rect, SpriteFrame, path, assetManager, ImageAsset, JsonAsset, TextAsset, Asset,
|
|
1
|
+
import { HorizontalTextAlignment, VerticalTextAlignment, director, macro, Scheduler, math, instantiate, _decorator, Component, SpriteAtlas, Size, Vec2, Rect, SpriteFrame, path, assetManager, Texture2D, ImageAsset, JsonAsset, TextAsset, Asset, find, Canvas, Node, Vec3, Vec4, resources, UITransform, Widget } from 'cc';
|
|
2
2
|
|
|
3
3
|
class NetUtil {
|
|
4
4
|
// 获取URL的参数对象
|
|
@@ -4766,6 +4766,16 @@ class AssetLoader extends Dispatcher {
|
|
|
4766
4766
|
this._loaderList.push(item);
|
|
4767
4767
|
return this;
|
|
4768
4768
|
}
|
|
4769
|
+
loadTexture2D(uri, otherConfig) {
|
|
4770
|
+
let item = new LoaderItem();
|
|
4771
|
+
item.type = "Texture2D";
|
|
4772
|
+
item.uri = new AssetURI(uri);
|
|
4773
|
+
if (otherConfig) {
|
|
4774
|
+
item.onComplete = otherConfig.onComplete;
|
|
4775
|
+
}
|
|
4776
|
+
this._loaderList.push(item);
|
|
4777
|
+
return this;
|
|
4778
|
+
}
|
|
4769
4779
|
loadImageAsset(uri, otherConfig) {
|
|
4770
4780
|
let item = new LoaderItem();
|
|
4771
4781
|
item.type = "ImageAsset";
|
|
@@ -4894,6 +4904,14 @@ class AssetLoader extends Dispatcher {
|
|
|
4894
4904
|
});
|
|
4895
4905
|
break;
|
|
4896
4906
|
}
|
|
4907
|
+
case "Texture2D": {
|
|
4908
|
+
this._loadByItem(item, Texture2D, (err, asset) => {
|
|
4909
|
+
this._loaded++;
|
|
4910
|
+
item.callHandler(null, asset);
|
|
4911
|
+
this.validComplete();
|
|
4912
|
+
});
|
|
4913
|
+
break;
|
|
4914
|
+
}
|
|
4897
4915
|
}
|
|
4898
4916
|
});
|
|
4899
4917
|
return this;
|
|
@@ -5477,7 +5495,7 @@ var GeometryDirection;
|
|
|
5477
5495
|
GeometryDirection[GeometryDirection["NorthWest"] = 5] = "NorthWest";
|
|
5478
5496
|
GeometryDirection[GeometryDirection["North"] = 6] = "North";
|
|
5479
5497
|
GeometryDirection[GeometryDirection["NorthEast"] = 7] = "NorthEast";
|
|
5480
|
-
GeometryDirection[GeometryDirection["Any"] =
|
|
5498
|
+
GeometryDirection[GeometryDirection["Any"] = 255] = "Any";
|
|
5481
5499
|
})(GeometryDirection || (GeometryDirection = {}));
|
|
5482
5500
|
var DirectionMode;
|
|
5483
5501
|
(function (DirectionMode) {
|