@zhongguo168a/yxeditor-common 0.0.40 → 0.0.41
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 +17 -16
- package/dist/index.esm.js +58 -63
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1056,19 +1056,6 @@ declare class View extends EventDispatcher {
|
|
|
1056
1056
|
protected _route: Route;
|
|
1057
1057
|
}
|
|
1058
1058
|
|
|
1059
|
-
declare class UIObjectDict extends Dictionary<string, any | List> {
|
|
1060
|
-
/**
|
|
1061
|
-
* 获取唯一的
|
|
1062
|
-
* @param prefab
|
|
1063
|
-
*/
|
|
1064
|
-
uniqueObject(prefab: Prefab): Node;
|
|
1065
|
-
removeObject(prefab: Prefab): void;
|
|
1066
|
-
popObject(prefab: Prefab): any;
|
|
1067
|
-
backObject(object: Node): void;
|
|
1068
|
-
protected getList(key: any): List;
|
|
1069
|
-
}
|
|
1070
|
-
declare var uidict: UIObjectDict;
|
|
1071
|
-
|
|
1072
1059
|
declare class ViewList extends List<View> {
|
|
1073
1060
|
}
|
|
1074
1061
|
/**
|
|
@@ -1095,8 +1082,6 @@ declare class ViewRepo extends ViewDict {
|
|
|
1095
1082
|
listByRoutePath(path: string): ViewList;
|
|
1096
1083
|
listByTags(tags: string[]): ViewList;
|
|
1097
1084
|
protected getController(name: string): ViewController;
|
|
1098
|
-
get objectDict(): UIObjectDict;
|
|
1099
|
-
protected _objectDict: UIObjectDict;
|
|
1100
1085
|
protected _indexLayer: {};
|
|
1101
1086
|
protected _indexRoute: {};
|
|
1102
1087
|
}
|
|
@@ -1154,6 +1139,22 @@ declare class ViewController extends Controller {
|
|
|
1154
1139
|
protected _layer: string;
|
|
1155
1140
|
}
|
|
1156
1141
|
|
|
1142
|
+
declare class UIObjectRepo extends Dictionary<string, any | List> {
|
|
1143
|
+
/**
|
|
1144
|
+
* 获取唯一的
|
|
1145
|
+
* @param prefab
|
|
1146
|
+
*/
|
|
1147
|
+
uniqueObject(prefab: Prefab): Node;
|
|
1148
|
+
removeObject(prefab: Prefab): void;
|
|
1149
|
+
popObject(prefab: Prefab): any;
|
|
1150
|
+
backObject(object: Node): void;
|
|
1151
|
+
protected getList(key: any): List;
|
|
1152
|
+
}
|
|
1153
|
+
/**
|
|
1154
|
+
* 全局的UI对象库,用于管理一些常用的ui对象,例如主界面,背包
|
|
1155
|
+
*/
|
|
1156
|
+
declare var uirepo: UIObjectRepo;
|
|
1157
|
+
|
|
1157
1158
|
declare class ViewHistory extends RouteList {
|
|
1158
1159
|
back(): void;
|
|
1159
1160
|
}
|
|
@@ -2040,5 +2041,5 @@ declare class WidgetUtil {
|
|
|
2040
2041
|
}
|
|
2041
2042
|
declare var widgetutil: WidgetUtil;
|
|
2042
2043
|
|
|
2043
|
-
export { ArrayUtil, AssetLoader, AssetURI, BitUtil, CallbackList, CameraUtil, CanvasUtil, Controller, ControllerDict, ControllerRepo, ConvertUtil, DictIterator, DictNode, DictSource, Dictionary, Dispatcher, DocUtil, ErrorUtil, EventDispatcher, EventItem, EventUtil, Factory, FloatUtil, GeometryUtil, IdentUtil, LOGGER_EVENT, LinkError, List, ListIterator, ListNode, ListSource, Listener, LogLevel, LogManager, Logger, MapUtil, MathUtil, Model, NetUtil, PageController, PathUtil, Pool, RandUtil, Route, RouteList, SampleCallbackList, SamplePool, SamplePoolSet, ScaleUtil, SimpleModel, StringUtil, TimeUtil, Timer, TreeIterator, TreeNode, TreeNodePlugin, TreeRoot, TreeRootPlugin, TreeUtil, UIManager,
|
|
2044
|
+
export { ArrayUtil, AssetLoader, AssetURI, BitUtil, CallbackList, CameraUtil, CanvasUtil, Controller, ControllerDict, ControllerRepo, ConvertUtil, DictIterator, DictNode, DictSource, Dictionary, Dispatcher, DocUtil, ErrorUtil, EventDispatcher, EventItem, EventUtil, Factory, FloatUtil, GeometryUtil, IdentUtil, LOGGER_EVENT, LinkError, List, ListIterator, ListNode, ListSource, Listener, LogLevel, LogManager, Logger, MapUtil, MathUtil, Model, NetUtil, PageController, PathUtil, Pool, RandUtil, Route, RouteList, SampleCallbackList, SamplePool, SamplePoolSet, ScaleUtil, SimpleModel, StringUtil, TimeUtil, Timer, TreeIterator, TreeNode, TreeNodePlugin, TreeRoot, TreeRootPlugin, TreeUtil, UIManager, UIObjectRepo, UIPoolConfig, UISingleConfig, UIUtil, View, ViewController, ViewDict, ViewEvent, ViewHistory, ViewList, ViewRepo, ViewState, WidgetAlign, WidgetUtil, XAssetManager, XEvent, arrayutil, assetx, bitutil, camerautil, canvasutil, convertutil, ctrlrepo, docutil, errorutil, eventmgr, eventutil, floatutil, formatutil, geoutil, identutil, loadAtlas, logmgr, maputil, mathutil, netutil, parseAtlas, parsePlist, pathutil, randutil, resutil, scaleutil, stringutil, timer, timeutil, treeutil, uimgr, uirepo, uiutil, viewhistorys, viewrepo, widgetutil };
|
|
2044
2045
|
export type { CreatorFunction, DisposeFunction, IController, IError, IEventDispatcher, IExtend, IListItem, IModel, IModule, ITreeListItem, RecycleFunction };
|
package/dist/index.esm.js
CHANGED
|
@@ -3693,60 +3693,6 @@ Route.data = {};
|
|
|
3693
3693
|
class RouteList extends List {
|
|
3694
3694
|
}
|
|
3695
3695
|
|
|
3696
|
-
class UIObjectDict extends Dictionary {
|
|
3697
|
-
/**
|
|
3698
|
-
* 获取唯一的
|
|
3699
|
-
* @param prefab
|
|
3700
|
-
*/
|
|
3701
|
-
uniqueObject(prefab) {
|
|
3702
|
-
if (!prefab) {
|
|
3703
|
-
console.warn("未设置prefab");
|
|
3704
|
-
return;
|
|
3705
|
-
}
|
|
3706
|
-
let key = prefab.data.uuid;
|
|
3707
|
-
let object = this.get(key);
|
|
3708
|
-
if (!object) {
|
|
3709
|
-
object = instantiate(prefab);
|
|
3710
|
-
this.set(key, object);
|
|
3711
|
-
}
|
|
3712
|
-
return object;
|
|
3713
|
-
}
|
|
3714
|
-
removeObject(prefab) {
|
|
3715
|
-
if (!prefab) {
|
|
3716
|
-
console.warn("未设置prefab");
|
|
3717
|
-
return;
|
|
3718
|
-
}
|
|
3719
|
-
this.delete(prefab.data.uuid);
|
|
3720
|
-
}
|
|
3721
|
-
popObject(prefab) {
|
|
3722
|
-
let object;
|
|
3723
|
-
let key = prefab.data.uuid;
|
|
3724
|
-
let list = this.getList(key);
|
|
3725
|
-
if (list.length == 0) {
|
|
3726
|
-
object = instantiate(prefab);
|
|
3727
|
-
}
|
|
3728
|
-
else {
|
|
3729
|
-
object = list.pop();
|
|
3730
|
-
}
|
|
3731
|
-
return object;
|
|
3732
|
-
}
|
|
3733
|
-
backObject(object) {
|
|
3734
|
-
// @ts-ignore
|
|
3735
|
-
let key = object.prefab.asset.uuid;
|
|
3736
|
-
let list = this.getList(key);
|
|
3737
|
-
list.push(object);
|
|
3738
|
-
}
|
|
3739
|
-
getList(key) {
|
|
3740
|
-
let list = this.get(key);
|
|
3741
|
-
if (!list) {
|
|
3742
|
-
list = new List();
|
|
3743
|
-
this.set(key, list);
|
|
3744
|
-
}
|
|
3745
|
-
return list;
|
|
3746
|
-
}
|
|
3747
|
-
}
|
|
3748
|
-
var uidict = new UIObjectDict();
|
|
3749
|
-
|
|
3750
3696
|
class ViewList extends List {
|
|
3751
3697
|
}
|
|
3752
3698
|
/**
|
|
@@ -3816,14 +3762,6 @@ class ViewRepo extends ViewDict {
|
|
|
3816
3762
|
getController(name) {
|
|
3817
3763
|
return ctrlrepo.get(name);
|
|
3818
3764
|
}
|
|
3819
|
-
get objectDict() {
|
|
3820
|
-
let dict = this._objectDict;
|
|
3821
|
-
if (!dict) {
|
|
3822
|
-
dict = new UIObjectDict();
|
|
3823
|
-
this._objectDict = dict;
|
|
3824
|
-
}
|
|
3825
|
-
return dict;
|
|
3826
|
-
}
|
|
3827
3765
|
}
|
|
3828
3766
|
const viewrepo = new ViewRepo();
|
|
3829
3767
|
|
|
@@ -4040,6 +3978,63 @@ class ViewController extends Controller {
|
|
|
4040
3978
|
}
|
|
4041
3979
|
}
|
|
4042
3980
|
|
|
3981
|
+
class UIObjectRepo extends Dictionary {
|
|
3982
|
+
/**
|
|
3983
|
+
* 获取唯一的
|
|
3984
|
+
* @param prefab
|
|
3985
|
+
*/
|
|
3986
|
+
uniqueObject(prefab) {
|
|
3987
|
+
if (!prefab) {
|
|
3988
|
+
console.warn("未设置prefab");
|
|
3989
|
+
return;
|
|
3990
|
+
}
|
|
3991
|
+
let key = prefab.data.uuid;
|
|
3992
|
+
let object = this.get(key);
|
|
3993
|
+
if (!object) {
|
|
3994
|
+
object = instantiate(prefab);
|
|
3995
|
+
this.set(key, object);
|
|
3996
|
+
}
|
|
3997
|
+
return object;
|
|
3998
|
+
}
|
|
3999
|
+
removeObject(prefab) {
|
|
4000
|
+
if (!prefab) {
|
|
4001
|
+
console.warn("未设置prefab");
|
|
4002
|
+
return;
|
|
4003
|
+
}
|
|
4004
|
+
this.delete(prefab.data.uuid);
|
|
4005
|
+
}
|
|
4006
|
+
popObject(prefab) {
|
|
4007
|
+
let object;
|
|
4008
|
+
let key = prefab.data.uuid;
|
|
4009
|
+
let list = this.getList(key);
|
|
4010
|
+
if (list.length == 0) {
|
|
4011
|
+
object = instantiate(prefab);
|
|
4012
|
+
}
|
|
4013
|
+
else {
|
|
4014
|
+
object = list.pop();
|
|
4015
|
+
}
|
|
4016
|
+
return object;
|
|
4017
|
+
}
|
|
4018
|
+
backObject(object) {
|
|
4019
|
+
// @ts-ignore
|
|
4020
|
+
let key = object.prefab.asset.uuid;
|
|
4021
|
+
let list = this.getList(key);
|
|
4022
|
+
list.push(object);
|
|
4023
|
+
}
|
|
4024
|
+
getList(key) {
|
|
4025
|
+
let list = this.get(key);
|
|
4026
|
+
if (!list) {
|
|
4027
|
+
list = new List();
|
|
4028
|
+
this.set(key, list);
|
|
4029
|
+
}
|
|
4030
|
+
return list;
|
|
4031
|
+
}
|
|
4032
|
+
}
|
|
4033
|
+
/**
|
|
4034
|
+
* 全局的UI对象库,用于管理一些常用的ui对象,例如主界面,背包
|
|
4035
|
+
*/
|
|
4036
|
+
var uirepo = new UIObjectRepo();
|
|
4037
|
+
|
|
4043
4038
|
class ViewHistory extends RouteList {
|
|
4044
4039
|
back() {
|
|
4045
4040
|
if (viewhistorys.length == 0) {
|
|
@@ -6384,5 +6379,5 @@ class WidgetUtil {
|
|
|
6384
6379
|
}
|
|
6385
6380
|
var widgetutil = new WidgetUtil();
|
|
6386
6381
|
|
|
6387
|
-
export { ArrayUtil, AssetLoader, AssetURI, BitUtil, CallbackList, CameraUtil, CanvasUtil, Controller, ControllerDict, ControllerRepo, ConvertUtil, DictIterator, DictNode, DictSource, Dictionary, Dispatcher, DocUtil, ErrorUtil, EventDispatcher, EventItem, EventUtil, Factory, FloatUtil, GeometryUtil, IdentUtil, LOGGER_EVENT, LinkError, List, ListIterator, ListNode, ListSource, Listener, LogLevel, LogManager, Logger, MapUtil, MathUtil, Model, NetUtil, PageController, PathUtil, Pool, RandUtil, Route, RouteList, SampleCallbackList, SamplePool, SamplePoolSet, ScaleUtil, SimpleModel, StringUtil, TimeUtil, Timer, TreeIterator, TreeNode, TreeNodePlugin, TreeRoot, TreeRootPlugin, TreeUtil, UIManager,
|
|
6382
|
+
export { ArrayUtil, AssetLoader, AssetURI, BitUtil, CallbackList, CameraUtil, CanvasUtil, Controller, ControllerDict, ControllerRepo, ConvertUtil, DictIterator, DictNode, DictSource, Dictionary, Dispatcher, DocUtil, ErrorUtil, EventDispatcher, EventItem, EventUtil, Factory, FloatUtil, GeometryUtil, IdentUtil, LOGGER_EVENT, LinkError, List, ListIterator, ListNode, ListSource, Listener, LogLevel, LogManager, Logger, MapUtil, MathUtil, Model, NetUtil, PageController, PathUtil, Pool, RandUtil, Route, RouteList, SampleCallbackList, SamplePool, SamplePoolSet, ScaleUtil, SimpleModel, StringUtil, TimeUtil, Timer, TreeIterator, TreeNode, TreeNodePlugin, TreeRoot, TreeRootPlugin, TreeUtil, UIManager, UIObjectRepo, UIPoolConfig, UISingleConfig, UIUtil, View, ViewController, ViewDict, ViewEvent, ViewHistory, ViewList, ViewRepo, ViewState, WidgetAlign, WidgetUtil, XAssetManager, XEvent, arrayutil, assetx, bitutil, camerautil, canvasutil, convertutil, ctrlrepo, docutil, errorutil, eventmgr, eventutil, floatutil, formatutil, geoutil, identutil, loadAtlas, logmgr, maputil, mathutil, netutil, parseAtlas, parsePlist, pathutil, randutil, resutil, scaleutil, stringutil, timer, timeutil, treeutil, uimgr, uirepo, uiutil, viewhistorys, viewrepo, widgetutil };
|
|
6388
6383
|
//# sourceMappingURL=index.esm.js.map
|