@zhongguo168a/yxeditor-common 0.0.14 → 0.0.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/dist/index.d.ts +9 -1
- package/dist/index.esm.js +25 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1527,6 +1527,14 @@ declare class SamplePool {
|
|
|
1527
1527
|
*/
|
|
1528
1528
|
put(obj: any): void;
|
|
1529
1529
|
}
|
|
1530
|
+
/**
|
|
1531
|
+
* 对象池
|
|
1532
|
+
*/
|
|
1533
|
+
declare class SamplePoolSet {
|
|
1534
|
+
get(name: string): any;
|
|
1535
|
+
put(name: string, item: any): void;
|
|
1536
|
+
protected pools: {};
|
|
1537
|
+
}
|
|
1530
1538
|
|
|
1531
1539
|
declare class ConvertUtil {
|
|
1532
1540
|
anyToBoolean(val: any, defaultValue?: boolean): boolean;
|
|
@@ -1938,5 +1946,5 @@ declare const pathutil: PathUtil;
|
|
|
1938
1946
|
declare function parsePlist(plist: any, texture: any): SpriteAtlas;
|
|
1939
1947
|
declare function loadAtlas(url: any, callback: any): void;
|
|
1940
1948
|
|
|
1941
|
-
export { ArrayUtil, AssetLoader, AssetURI, BitUtil, CallbackList, Controller, ControllerDict, ControllerSet, ConvertUtil, DictIterator, DictNode, DictSource, Dictionary, Dispatcher, ErrorUtil, EventItem, EventManager, EventUtil, Factory, FloatUtil, GeometryUtil, IdentUtil, LOGGER_EVENT, LinkError, List, ListIterator, ListNode, ListSource, Listener, LogLevel, LogManager, Logger, MapUtil, MathUtil, Model, Module, NetUtil, Page, PageController, PageEvent, PageLayer, PageList, PageRepo, PageState, PathUtil, Pool, RandUtil, Route, SampleCallbackList, SamplePool, ScaleUtil, SimpleModel, StringUtil, TimeUtil, Timer, TreeIterator, TreeNode, TreeNodePlugin, TreeRoot, TreeRootPlugin, UIManager, UIObjectDict, UIPoolConfig, UISingleConfig, UIUtil, ViewController, XAssetManager, XEvent, arrayutil, assetx, bitutil, convertutil, ctrlrepo, errorutil, eventmgr, eventutil, floatutil, formatutil, geoutil, identutil, loadAtlas, logmgr, maputil, mathutil, netutil, pagerepo, parseAtlas, parsePlist, pathutil, randutil, resutil, scaleutil, stringutil, timer, timeutil, uidict, uimgr, uiutil };
|
|
1949
|
+
export { ArrayUtil, AssetLoader, AssetURI, BitUtil, CallbackList, Controller, ControllerDict, ControllerSet, ConvertUtil, DictIterator, DictNode, DictSource, Dictionary, Dispatcher, ErrorUtil, EventItem, EventManager, EventUtil, Factory, FloatUtil, GeometryUtil, IdentUtil, LOGGER_EVENT, LinkError, List, ListIterator, ListNode, ListSource, Listener, LogLevel, LogManager, Logger, MapUtil, MathUtil, Model, Module, NetUtil, Page, PageController, PageEvent, PageLayer, PageList, PageRepo, PageState, PathUtil, Pool, RandUtil, Route, SampleCallbackList, SamplePool, SamplePoolSet, ScaleUtil, SimpleModel, StringUtil, TimeUtil, Timer, TreeIterator, TreeNode, TreeNodePlugin, TreeRoot, TreeRootPlugin, UIManager, UIObjectDict, UIPoolConfig, UISingleConfig, UIUtil, ViewController, XAssetManager, XEvent, arrayutil, assetx, bitutil, convertutil, ctrlrepo, errorutil, eventmgr, eventutil, floatutil, formatutil, geoutil, identutil, loadAtlas, logmgr, maputil, mathutil, netutil, pagerepo, parseAtlas, parsePlist, pathutil, randutil, resutil, scaleutil, stringutil, timer, timeutil, uidict, uimgr, uiutil };
|
|
1942
1950
|
export type { CreatorFunction, DisposeFunction, IController, IError, IEventManager, IExtend, IListItem, IModel, IModule, IModuleSample, ITreeListItem, RecycleFunction };
|
package/dist/index.esm.js
CHANGED
|
@@ -851,6 +851,30 @@ class SamplePool {
|
|
|
851
851
|
this.list.push(obj);
|
|
852
852
|
}
|
|
853
853
|
}
|
|
854
|
+
/**
|
|
855
|
+
* 对象池
|
|
856
|
+
*/
|
|
857
|
+
class SamplePoolSet {
|
|
858
|
+
constructor() {
|
|
859
|
+
this.pools = {};
|
|
860
|
+
}
|
|
861
|
+
get(name) {
|
|
862
|
+
let pool = this.pools[name];
|
|
863
|
+
if (!pool) {
|
|
864
|
+
pool = new SamplePool();
|
|
865
|
+
this.pools[name] = pool;
|
|
866
|
+
}
|
|
867
|
+
return pool.get();
|
|
868
|
+
}
|
|
869
|
+
put(name, item) {
|
|
870
|
+
let pool = this.pools[name];
|
|
871
|
+
if (!pool) {
|
|
872
|
+
pool = new SamplePool();
|
|
873
|
+
this.pools[name] = pool;
|
|
874
|
+
}
|
|
875
|
+
pool.put(item);
|
|
876
|
+
}
|
|
877
|
+
}
|
|
854
878
|
|
|
855
879
|
const log = logmgr.getEventLogger();
|
|
856
880
|
/**
|
|
@@ -6099,5 +6123,5 @@ class PathUtil {
|
|
|
6099
6123
|
}
|
|
6100
6124
|
const pathutil = new PathUtil();
|
|
6101
6125
|
|
|
6102
|
-
export { ArrayUtil, AssetLoader, AssetURI, BitUtil, CallbackList, Controller, ControllerDict, ControllerSet, ConvertUtil, DictIterator, DictNode, DictSource, Dictionary, Dispatcher, ErrorUtil, EventItem, EventManager, EventUtil, Factory, FloatUtil, GeometryUtil, IdentUtil, LOGGER_EVENT, LinkError, List, ListIterator, ListNode, ListSource, Listener, LogLevel, LogManager, Logger, MapUtil, MathUtil, Model, Module, NetUtil, Page, PageController, PageEvent, PageLayer, PageList, PageRepo, PageState, PathUtil, Pool, RandUtil, Route, SampleCallbackList, SamplePool, ScaleUtil, SimpleModel, StringUtil, TimeUtil, Timer, TreeIterator, TreeNode, TreeNodePlugin, TreeRoot, TreeRootPlugin, UIManager, UIObjectDict, UIPoolConfig, UISingleConfig, UIUtil, ViewController, XAssetManager, XEvent, arrayutil, assetx, bitutil, convertutil, ctrlrepo, errorutil, eventmgr, eventutil, floatutil, formatutil, geoutil, identutil, loadAtlas, logmgr, maputil, mathutil, netutil, pagerepo, parseAtlas, parsePlist, pathutil, randutil, resutil, scaleutil, stringutil, timer, timeutil, uidict, uimgr, uiutil };
|
|
6126
|
+
export { ArrayUtil, AssetLoader, AssetURI, BitUtil, CallbackList, Controller, ControllerDict, ControllerSet, ConvertUtil, DictIterator, DictNode, DictSource, Dictionary, Dispatcher, ErrorUtil, EventItem, EventManager, EventUtil, Factory, FloatUtil, GeometryUtil, IdentUtil, LOGGER_EVENT, LinkError, List, ListIterator, ListNode, ListSource, Listener, LogLevel, LogManager, Logger, MapUtil, MathUtil, Model, Module, NetUtil, Page, PageController, PageEvent, PageLayer, PageList, PageRepo, PageState, PathUtil, Pool, RandUtil, Route, SampleCallbackList, SamplePool, SamplePoolSet, ScaleUtil, SimpleModel, StringUtil, TimeUtil, Timer, TreeIterator, TreeNode, TreeNodePlugin, TreeRoot, TreeRootPlugin, UIManager, UIObjectDict, UIPoolConfig, UISingleConfig, UIUtil, ViewController, XAssetManager, XEvent, arrayutil, assetx, bitutil, convertutil, ctrlrepo, errorutil, eventmgr, eventutil, floatutil, formatutil, geoutil, identutil, loadAtlas, logmgr, maputil, mathutil, netutil, pagerepo, parseAtlas, parsePlist, pathutil, randutil, resutil, scaleutil, stringutil, timer, timeutil, uidict, uimgr, uiutil };
|
|
6103
6127
|
//# sourceMappingURL=index.esm.js.map
|