@zhongguo168a/yxeditor-common 0.0.15 → 0.0.16
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 +295 -198
- package/dist/index.esm.js +875 -617
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HorizontalTextAlignment, VerticalTextAlignment, Scheduler, Prefab, Node, Component, ISchedulable, AssetManager, Asset, SpriteAtlas, Vec2, Vec3, Vec4 } from 'cc';
|
|
1
|
+
import { HorizontalTextAlignment, VerticalTextAlignment, Scheduler, Prefab, Node, Component, ISchedulable, AssetManager, Asset, SpriteAtlas, Camera, Canvas, Vec2, Vec3, Vec4, Widget, UITransform, math } from 'cc';
|
|
2
2
|
|
|
3
3
|
interface IError {
|
|
4
4
|
isCancel(): boolean;
|
|
@@ -1536,6 +1536,63 @@ declare class SamplePoolSet {
|
|
|
1536
1536
|
protected pools: {};
|
|
1537
1537
|
}
|
|
1538
1538
|
|
|
1539
|
+
declare class ArrayUtil {
|
|
1540
|
+
lastItem(array: any[]): any;
|
|
1541
|
+
unique(array: any[]): any[];
|
|
1542
|
+
removeSelf(arr: any[], item: any): void;
|
|
1543
|
+
/**
|
|
1544
|
+
*
|
|
1545
|
+
* @param arr
|
|
1546
|
+
* @param desc 降序
|
|
1547
|
+
*/
|
|
1548
|
+
sortNumber(arr: any[], desc?: boolean): any[];
|
|
1549
|
+
sortString(arr: any[], desc?: boolean): any[];
|
|
1550
|
+
getByPath(target: any, key: string): any;
|
|
1551
|
+
sortObject(arr: any[], desc: boolean, ...paths: string[]): any[];
|
|
1552
|
+
sortBySeq(arr: any[], desc: boolean, seq: {
|
|
1553
|
+
[key: string]: number;
|
|
1554
|
+
}, key?: string): any[];
|
|
1555
|
+
indexOfConf(arr: any[], caller: any, f: (item: any) => boolean): number;
|
|
1556
|
+
}
|
|
1557
|
+
declare const arrayutil: ArrayUtil;
|
|
1558
|
+
|
|
1559
|
+
declare class BitUtil {
|
|
1560
|
+
getState(state: number, key: number): boolean;
|
|
1561
|
+
setState(state: number, key: number, value: boolean): number;
|
|
1562
|
+
/**
|
|
1563
|
+
* @param state
|
|
1564
|
+
* @param key
|
|
1565
|
+
*/
|
|
1566
|
+
getStateBig(state: bigint, key: bigint): boolean;
|
|
1567
|
+
setStateBig(state: bigint, key: bigint, value: boolean): bigint;
|
|
1568
|
+
/**
|
|
1569
|
+
* key从0开始
|
|
1570
|
+
* @param val
|
|
1571
|
+
*/
|
|
1572
|
+
convertToState(val: {
|
|
1573
|
+
[key: string]: boolean;
|
|
1574
|
+
}): number;
|
|
1575
|
+
/**
|
|
1576
|
+
* 判断是否匹配
|
|
1577
|
+
* @param target
|
|
1578
|
+
* @param match 0-返回true
|
|
1579
|
+
*/
|
|
1580
|
+
match(target: number, match: number): boolean;
|
|
1581
|
+
}
|
|
1582
|
+
declare const bitutil: BitUtil;
|
|
1583
|
+
|
|
1584
|
+
declare class CameraUtil {
|
|
1585
|
+
getUICamera(): Camera;
|
|
1586
|
+
}
|
|
1587
|
+
declare let camerautil: CameraUtil;
|
|
1588
|
+
|
|
1589
|
+
declare class CanvasUtil {
|
|
1590
|
+
getCanvas(): Canvas;
|
|
1591
|
+
protected onSceneDestroyed(event: any): void;
|
|
1592
|
+
_canvas: Canvas;
|
|
1593
|
+
}
|
|
1594
|
+
declare let canvasutil: CanvasUtil;
|
|
1595
|
+
|
|
1539
1596
|
declare class ConvertUtil {
|
|
1540
1597
|
anyToBoolean(val: any, defaultValue?: boolean): boolean;
|
|
1541
1598
|
anyToInt(val: any, defaultValue?: number): number;
|
|
@@ -1550,6 +1607,97 @@ declare class ConvertUtil {
|
|
|
1550
1607
|
}
|
|
1551
1608
|
declare const convertutil: ConvertUtil;
|
|
1552
1609
|
|
|
1610
|
+
declare class DocUtil {
|
|
1611
|
+
copyToClip(value: string): boolean;
|
|
1612
|
+
selectText(textbox: any, startIndex: any, stopIndex: any): void;
|
|
1613
|
+
}
|
|
1614
|
+
declare var docutil: DocUtil;
|
|
1615
|
+
|
|
1616
|
+
declare class EventUtil {
|
|
1617
|
+
}
|
|
1618
|
+
/**
|
|
1619
|
+
* 框架的事件
|
|
1620
|
+
*/
|
|
1621
|
+
declare const eventutil: EventUtil;
|
|
1622
|
+
|
|
1623
|
+
declare class FloatUtil {
|
|
1624
|
+
epsilon: number;
|
|
1625
|
+
neq(a: number, b: number, threshold?: number): boolean;
|
|
1626
|
+
eq(a: number, b: number, threshold?: number): boolean;
|
|
1627
|
+
gt(a: number, b: number, threshold?: number): boolean;
|
|
1628
|
+
lt(a: number, b: number, threshold?: number): boolean;
|
|
1629
|
+
geq(a: number, b: number, threshold?: number): boolean;
|
|
1630
|
+
leq(a: number, b: number, threshold?: number): boolean;
|
|
1631
|
+
}
|
|
1632
|
+
declare let floatutil: FloatUtil;
|
|
1633
|
+
|
|
1634
|
+
declare namespace formatutil {
|
|
1635
|
+
/**
|
|
1636
|
+
* 格式化数字
|
|
1637
|
+
* @param format 第nn天
|
|
1638
|
+
* @param val
|
|
1639
|
+
*/
|
|
1640
|
+
function toChinese(formatter: string, val: number): string;
|
|
1641
|
+
/**
|
|
1642
|
+
* 转换为 x亿x万
|
|
1643
|
+
* @param val
|
|
1644
|
+
*/
|
|
1645
|
+
function format数字使用万亿(val: number | string): string;
|
|
1646
|
+
/**
|
|
1647
|
+
* 格式化货币,每N位增加一个逗号识别
|
|
1648
|
+
* @param val
|
|
1649
|
+
* @param N
|
|
1650
|
+
*/
|
|
1651
|
+
function format数字使用逗号(val: number | string, N?: number): string;
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
declare enum GeometryDirection {
|
|
1655
|
+
East = 0,
|
|
1656
|
+
SouthEast = 1,
|
|
1657
|
+
South = 2,
|
|
1658
|
+
SouthWest = 3,
|
|
1659
|
+
West = 4,
|
|
1660
|
+
NorthWest = 5,
|
|
1661
|
+
North = 6,
|
|
1662
|
+
NorthEast = 7
|
|
1663
|
+
}
|
|
1664
|
+
declare class GeometryUtil {
|
|
1665
|
+
/**
|
|
1666
|
+
* mode,8表示八方向,2表示二方向(左右),4表示4方向
|
|
1667
|
+
* @param dot
|
|
1668
|
+
* @param mode
|
|
1669
|
+
*/
|
|
1670
|
+
angleToDirection(dot: number, mode?: number): GeometryDirection;
|
|
1671
|
+
}
|
|
1672
|
+
declare let geoutil: GeometryUtil;
|
|
1673
|
+
|
|
1674
|
+
declare class IdentUtil {
|
|
1675
|
+
/**
|
|
1676
|
+
* 设置时间的基线,通过减去已经过去的时间,可缩短id长度
|
|
1677
|
+
* 注:同一个项目必须拥有同样的基线,否则有几率出现相同的id!
|
|
1678
|
+
* 注2:基线必须与精度符合
|
|
1679
|
+
* @param time
|
|
1680
|
+
*/
|
|
1681
|
+
setTimeBaseline(time: number): void;
|
|
1682
|
+
protected _baseline: number;
|
|
1683
|
+
/**
|
|
1684
|
+
* 设置时间的精度
|
|
1685
|
+
* @param precision
|
|
1686
|
+
*/
|
|
1687
|
+
setTimePrecision(precision: "ms" | "s"): void;
|
|
1688
|
+
protected _precision: string;
|
|
1689
|
+
/**
|
|
1690
|
+
* 设置随机数的长度
|
|
1691
|
+
* @param value
|
|
1692
|
+
*/
|
|
1693
|
+
setRandLength(value?: number): void;
|
|
1694
|
+
protected _randLength: number;
|
|
1695
|
+
genOne(): string;
|
|
1696
|
+
protected _count: number;
|
|
1697
|
+
protected _lastTime: number;
|
|
1698
|
+
}
|
|
1699
|
+
declare const identutil: IdentUtil;
|
|
1700
|
+
|
|
1553
1701
|
declare class MapUtil {
|
|
1554
1702
|
/**
|
|
1555
1703
|
* 获取所欲的值
|
|
@@ -1665,32 +1813,16 @@ declare class MapUtil {
|
|
|
1665
1813
|
}
|
|
1666
1814
|
declare const maputil: MapUtil;
|
|
1667
1815
|
|
|
1668
|
-
declare class
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
* x, y 使用 鼠标点击事件产生的 event.getLocation()坐标
|
|
1677
|
-
* @param target
|
|
1678
|
-
* @param x
|
|
1679
|
-
* @param y
|
|
1680
|
-
*/
|
|
1681
|
-
hitTest(target: Node, x: number, y: number): boolean;
|
|
1682
|
-
findNode(node: Node, name: string): Node;
|
|
1683
|
-
walk(node: Node, f: (target: Node) => boolean): void;
|
|
1684
|
-
_walk(node: Node, f: (target: Node) => boolean): boolean;
|
|
1685
|
-
}
|
|
1686
|
-
declare const uiutil: UIUtil;
|
|
1687
|
-
|
|
1688
|
-
declare class EventUtil {
|
|
1816
|
+
declare class MathUtil {
|
|
1817
|
+
version: number;
|
|
1818
|
+
TempVec2: Vec2;
|
|
1819
|
+
TempVec3: Vec3;
|
|
1820
|
+
TempVec4: Vec4;
|
|
1821
|
+
convertVec2to3(vec2: Vec2, useTemp?: boolean): Vec3;
|
|
1822
|
+
convertVec3to2(vec3: Vec3, useTemp?: boolean): Vec2;
|
|
1823
|
+
isOdd(value: number): boolean;
|
|
1689
1824
|
}
|
|
1690
|
-
|
|
1691
|
-
* 框架的事件
|
|
1692
|
-
*/
|
|
1693
|
-
declare const eventutil: EventUtil;
|
|
1825
|
+
declare const mathutil: MathUtil;
|
|
1694
1826
|
|
|
1695
1827
|
declare class NetUtil {
|
|
1696
1828
|
decodeLocationSearch(search: string): any;
|
|
@@ -1703,116 +1835,14 @@ declare class NetUtil {
|
|
|
1703
1835
|
}
|
|
1704
1836
|
declare const netutil: NetUtil;
|
|
1705
1837
|
|
|
1706
|
-
declare class
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
* @param arr
|
|
1713
|
-
* @param desc 降序
|
|
1714
|
-
*/
|
|
1715
|
-
sortNumber(arr: any[], desc?: boolean): any[];
|
|
1716
|
-
sortString(arr: any[], desc?: boolean): any[];
|
|
1717
|
-
getByPath(target: any, key: string): any;
|
|
1718
|
-
sortObject(arr: any[], desc: boolean, ...paths: string[]): any[];
|
|
1719
|
-
sortBySeq(arr: any[], desc: boolean, seq: {
|
|
1720
|
-
[key: string]: number;
|
|
1721
|
-
}, key?: string): any[];
|
|
1722
|
-
indexOfConf(arr: any[], caller: any, f: (item: any) => boolean): number;
|
|
1723
|
-
}
|
|
1724
|
-
declare const arrayutil: ArrayUtil;
|
|
1725
|
-
|
|
1726
|
-
declare class ScaleUtil {
|
|
1727
|
-
tenToAny: string[];
|
|
1728
|
-
allstr: string;
|
|
1729
|
-
randString(size: number, n: number): string;
|
|
1730
|
-
decimalTo(num: number, n: number): string;
|
|
1731
|
-
findkey(instr: string): number;
|
|
1732
|
-
toDecimal(num: string, n: number): number;
|
|
1733
|
-
}
|
|
1734
|
-
declare const scaleutil: ScaleUtil;
|
|
1735
|
-
|
|
1736
|
-
declare class BitUtil {
|
|
1737
|
-
getState(state: number, key: number): boolean;
|
|
1738
|
-
setState(state: number, key: number, value: boolean): number;
|
|
1739
|
-
/**
|
|
1740
|
-
* @param state
|
|
1741
|
-
* @param key
|
|
1742
|
-
*/
|
|
1743
|
-
getStateBig(state: bigint, key: bigint): boolean;
|
|
1744
|
-
setStateBig(state: bigint, key: bigint, value: boolean): bigint;
|
|
1745
|
-
/**
|
|
1746
|
-
* key从0开始
|
|
1747
|
-
* @param val
|
|
1748
|
-
*/
|
|
1749
|
-
convertToState(val: {
|
|
1750
|
-
[key: string]: boolean;
|
|
1751
|
-
}): number;
|
|
1752
|
-
/**
|
|
1753
|
-
* 判断是否匹配
|
|
1754
|
-
* @param target
|
|
1755
|
-
* @param match 0-返回true
|
|
1756
|
-
*/
|
|
1757
|
-
match(target: number, match: number): boolean;
|
|
1758
|
-
}
|
|
1759
|
-
declare const bitutil: BitUtil;
|
|
1760
|
-
|
|
1761
|
-
declare class StringUtil {
|
|
1762
|
-
lowerFirst(key: string): string;
|
|
1763
|
-
upperFirst(key: string): string;
|
|
1764
|
-
cjkEncode(text: any): string;
|
|
1765
|
-
replaceFormat(format: string, source: any): string;
|
|
1766
|
-
/**
|
|
1767
|
-
*
|
|
1768
|
-
* @param format
|
|
1769
|
-
* @param source
|
|
1770
|
-
*/
|
|
1771
|
-
evalFormat(format: string, source: any): string;
|
|
1772
|
-
splitLast(val: string, separator: string): string;
|
|
1773
|
-
/**
|
|
1774
|
-
* 从最后一个分隔符截断字符串,返回截断的左右字符串
|
|
1775
|
-
* @param val
|
|
1776
|
-
* @param separator
|
|
1777
|
-
*/
|
|
1778
|
-
splitLastArray(val: string, separator: string): [string, string];
|
|
1779
|
-
/**
|
|
1780
|
-
* 截断字符串
|
|
1781
|
-
* @param val
|
|
1782
|
-
* @param separator
|
|
1783
|
-
* @return [最终的字符串, 被截断的字符串]
|
|
1784
|
-
*/
|
|
1785
|
-
truncateLast(val: string, separator: string): [string, string];
|
|
1786
|
-
fill(str: string, char: string, length: number): string;
|
|
1787
|
-
}
|
|
1788
|
-
declare const stringutil: StringUtil;
|
|
1789
|
-
|
|
1790
|
-
declare class IdentUtil {
|
|
1791
|
-
/**
|
|
1792
|
-
* 设置时间的基线,通过减去已经过去的时间,可缩短id长度
|
|
1793
|
-
* 注:同一个项目必须拥有同样的基线,否则有几率出现相同的id!
|
|
1794
|
-
* 注2:基线必须与精度符合
|
|
1795
|
-
* @param time
|
|
1796
|
-
*/
|
|
1797
|
-
setTimeBaseline(time: number): void;
|
|
1798
|
-
protected _baseline: number;
|
|
1799
|
-
/**
|
|
1800
|
-
* 设置时间的精度
|
|
1801
|
-
* @param precision
|
|
1802
|
-
*/
|
|
1803
|
-
setTimePrecision(precision: "ms" | "s"): void;
|
|
1804
|
-
protected _precision: string;
|
|
1805
|
-
/**
|
|
1806
|
-
* 设置随机数的长度
|
|
1807
|
-
* @param value
|
|
1808
|
-
*/
|
|
1809
|
-
setRandLength(value?: number): void;
|
|
1810
|
-
protected _randLength: number;
|
|
1811
|
-
genOne(): string;
|
|
1812
|
-
protected _count: number;
|
|
1813
|
-
protected _lastTime: number;
|
|
1838
|
+
declare class PathUtil {
|
|
1839
|
+
getDir(path: string): string;
|
|
1840
|
+
getRelativePath(fromPath: string, toPath: string): string;
|
|
1841
|
+
getSamePath(fromPath: string, toPath: string): string;
|
|
1842
|
+
protected validatePath(path: string): void;
|
|
1843
|
+
protected splitPath(path: string): string[];
|
|
1814
1844
|
}
|
|
1815
|
-
declare const
|
|
1845
|
+
declare const pathutil: PathUtil;
|
|
1816
1846
|
|
|
1817
1847
|
declare class RandUtil {
|
|
1818
1848
|
/**
|
|
@@ -1844,17 +1874,6 @@ declare class RandUtil {
|
|
|
1844
1874
|
}
|
|
1845
1875
|
declare const randutil: RandUtil;
|
|
1846
1876
|
|
|
1847
|
-
declare class MathUtil {
|
|
1848
|
-
version: number;
|
|
1849
|
-
TempVec2: Vec2;
|
|
1850
|
-
TempVec3: Vec3;
|
|
1851
|
-
TempVec4: Vec4;
|
|
1852
|
-
convertVec2to3(vec2: Vec2, useTemp?: boolean): Vec3;
|
|
1853
|
-
convertVec3to2(vec3: Vec3, useTemp?: boolean): Vec2;
|
|
1854
|
-
isOdd(value: number): boolean;
|
|
1855
|
-
}
|
|
1856
|
-
declare const mathutil: MathUtil;
|
|
1857
|
-
|
|
1858
1877
|
declare class ResUtil {
|
|
1859
1878
|
loadResource(path: string): Promise<[any, IError]>;
|
|
1860
1879
|
preloadResource(path: string): Promise<[any, IError]>;
|
|
@@ -1867,6 +1886,48 @@ declare class ResUtil {
|
|
|
1867
1886
|
}
|
|
1868
1887
|
declare var resutil: ResUtil;
|
|
1869
1888
|
|
|
1889
|
+
declare function parsePlist(plist: any, texture: any): SpriteAtlas;
|
|
1890
|
+
declare function loadAtlas(url: any, callback: any): void;
|
|
1891
|
+
|
|
1892
|
+
declare class ScaleUtil {
|
|
1893
|
+
tenToAny: string[];
|
|
1894
|
+
allstr: string;
|
|
1895
|
+
randString(size: number, n: number): string;
|
|
1896
|
+
decimalTo(num: number, n: number): string;
|
|
1897
|
+
findkey(instr: string): number;
|
|
1898
|
+
toDecimal(num: string, n: number): number;
|
|
1899
|
+
}
|
|
1900
|
+
declare const scaleutil: ScaleUtil;
|
|
1901
|
+
|
|
1902
|
+
declare class StringUtil {
|
|
1903
|
+
lowerFirst(key: string): string;
|
|
1904
|
+
upperFirst(key: string): string;
|
|
1905
|
+
cjkEncode(text: any): string;
|
|
1906
|
+
replaceFormat(format: string, source: any): string;
|
|
1907
|
+
/**
|
|
1908
|
+
*
|
|
1909
|
+
* @param format
|
|
1910
|
+
* @param source
|
|
1911
|
+
*/
|
|
1912
|
+
evalFormat(format: string, source: any): string;
|
|
1913
|
+
splitLast(val: string, separator: string): string;
|
|
1914
|
+
/**
|
|
1915
|
+
* 从最后一个分隔符截断字符串,返回截断的左右字符串
|
|
1916
|
+
* @param val
|
|
1917
|
+
* @param separator
|
|
1918
|
+
*/
|
|
1919
|
+
splitLastArray(val: string, separator: string): [string, string];
|
|
1920
|
+
/**
|
|
1921
|
+
* 截断字符串
|
|
1922
|
+
* @param val
|
|
1923
|
+
* @param separator
|
|
1924
|
+
* @return [最终的字符串, 被截断的字符串]
|
|
1925
|
+
*/
|
|
1926
|
+
truncateLast(val: string, separator: string): [string, string];
|
|
1927
|
+
fill(str: string, char: string, length: number): string;
|
|
1928
|
+
}
|
|
1929
|
+
declare const stringutil: StringUtil;
|
|
1930
|
+
|
|
1870
1931
|
declare class TimeUtil {
|
|
1871
1932
|
sleep(time: number): Promise<void>;
|
|
1872
1933
|
/**
|
|
@@ -1883,68 +1944,104 @@ declare class TimeUtil {
|
|
|
1883
1944
|
}
|
|
1884
1945
|
declare const timeutil: TimeUtil;
|
|
1885
1946
|
|
|
1886
|
-
declare
|
|
1887
|
-
East = 0,
|
|
1888
|
-
SouthEast = 1,
|
|
1889
|
-
South = 2,
|
|
1890
|
-
SouthWest = 3,
|
|
1891
|
-
West = 4,
|
|
1892
|
-
NorthWest = 5,
|
|
1893
|
-
North = 6,
|
|
1894
|
-
NorthEast = 7
|
|
1895
|
-
}
|
|
1896
|
-
declare class GeometryUtil {
|
|
1947
|
+
declare class TreeUtil {
|
|
1897
1948
|
/**
|
|
1898
|
-
*
|
|
1899
|
-
* @param
|
|
1900
|
-
* @param
|
|
1949
|
+
* 保存指定标签[tag]的值等于[value]的节点
|
|
1950
|
+
* @param root
|
|
1951
|
+
* @param key 存储的键
|
|
1952
|
+
* @param tag
|
|
1953
|
+
* @param value
|
|
1901
1954
|
*/
|
|
1902
|
-
|
|
1903
|
-
}
|
|
1904
|
-
declare let geoutil: GeometryUtil;
|
|
1905
|
-
|
|
1906
|
-
declare namespace formatutil {
|
|
1955
|
+
saveTagToLocalStorage(root: TreeRoot, key: string, tag: string, value: any): void;
|
|
1907
1956
|
/**
|
|
1908
|
-
*
|
|
1909
|
-
*
|
|
1910
|
-
* @param
|
|
1957
|
+
* 从ls中加载指定标签[tag]的值还原到[root]。
|
|
1958
|
+
* 返回localStorage是否存在键值
|
|
1959
|
+
* @param root
|
|
1960
|
+
* @param key
|
|
1961
|
+
* @param tag
|
|
1962
|
+
* @param value
|
|
1911
1963
|
*/
|
|
1912
|
-
|
|
1964
|
+
loadTagFromLocalStorage(root: TreeRoot, key: string, tag: string, value: any): boolean;
|
|
1965
|
+
}
|
|
1966
|
+
declare var treeutil: TreeUtil;
|
|
1967
|
+
|
|
1968
|
+
declare class UIUtil {
|
|
1913
1969
|
/**
|
|
1914
|
-
*
|
|
1915
|
-
*
|
|
1970
|
+
* 格式化节点的uuid,用于树结构
|
|
1971
|
+
* 树结构的路径的反斜杠与uuid有冲突
|
|
1972
|
+
* @param uuid
|
|
1916
1973
|
*/
|
|
1917
|
-
|
|
1974
|
+
formatUUIDForTree(uuid: string): string;
|
|
1918
1975
|
/**
|
|
1919
|
-
*
|
|
1920
|
-
* @param
|
|
1921
|
-
* @param
|
|
1976
|
+
* x, y 使用 鼠标点击事件产生的 event.getLocation()坐标
|
|
1977
|
+
* @param target
|
|
1978
|
+
* @param x
|
|
1979
|
+
* @param y
|
|
1922
1980
|
*/
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
epsilon: number;
|
|
1928
|
-
neq(a: number, b: number, threshold?: number): boolean;
|
|
1929
|
-
eq(a: number, b: number, threshold?: number): boolean;
|
|
1930
|
-
gt(a: number, b: number, threshold?: number): boolean;
|
|
1931
|
-
lt(a: number, b: number, threshold?: number): boolean;
|
|
1932
|
-
geq(a: number, b: number, threshold?: number): boolean;
|
|
1933
|
-
leq(a: number, b: number, threshold?: number): boolean;
|
|
1981
|
+
hitTest(target: Node, x: number, y: number): boolean;
|
|
1982
|
+
findNode(node: Node, name: string): Node;
|
|
1983
|
+
walk(node: Node, f: (target: Node) => boolean): void;
|
|
1984
|
+
_walk(node: Node, f: (target: Node) => boolean): boolean;
|
|
1934
1985
|
}
|
|
1935
|
-
declare
|
|
1986
|
+
declare const uiutil: UIUtil;
|
|
1936
1987
|
|
|
1937
|
-
declare class
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
protected
|
|
1942
|
-
protected
|
|
1988
|
+
declare class WidgetAlign {
|
|
1989
|
+
node: Node;
|
|
1990
|
+
targetNode: Node;
|
|
1991
|
+
protected nodeWidget: Widget;
|
|
1992
|
+
protected parentTransform: UITransform;
|
|
1993
|
+
protected targetTransform: UITransform;
|
|
1994
|
+
protected uipos: math.Vec3;
|
|
1995
|
+
constructor(node: Node, targetNode: Node);
|
|
1996
|
+
topTop(distance?: number): void;
|
|
1997
|
+
topBottom(distance?: number): void;
|
|
1998
|
+
leftleft(distance?: number): void;
|
|
1999
|
+
leftRight(distance?: number): void;
|
|
2000
|
+
}
|
|
2001
|
+
declare class WidgetUtil {
|
|
2002
|
+
/**
|
|
2003
|
+
* 与目标顶对齐
|
|
2004
|
+
* @param node 需要修改的节点
|
|
2005
|
+
* @param parent 对齐的父节点
|
|
2006
|
+
* @param distance
|
|
2007
|
+
*/
|
|
2008
|
+
alignTop(node: Node, parent: Node, distance?: number): void;
|
|
2009
|
+
/**
|
|
2010
|
+
* 与目标顶对齐,node和target都必须在渲染树中
|
|
2011
|
+
* @param node 需要修改的节点
|
|
2012
|
+
* @param target 对齐目标
|
|
2013
|
+
* @param distance
|
|
2014
|
+
*/
|
|
2015
|
+
alignTopWorld(node: Node, target: Node, distance?: number): void;
|
|
2016
|
+
/**
|
|
2017
|
+
* 与目标顶对齐,node和target都必须在渲染树中
|
|
2018
|
+
* @param node 需要修改的节点
|
|
2019
|
+
* @param target 对齐目标
|
|
2020
|
+
* @param distance
|
|
2021
|
+
*/
|
|
2022
|
+
alignBottomWorld(node: Node, target: Node, distance?: number): void;
|
|
2023
|
+
/**
|
|
2024
|
+
* 调整【node】的widget,对齐【targetNode】
|
|
2025
|
+
* @param node
|
|
2026
|
+
* @param targetNode
|
|
2027
|
+
*/
|
|
2028
|
+
align(node: Node, targetNode: Node): WidgetAlign;
|
|
2029
|
+
/**
|
|
2030
|
+
* 与目标右对齐
|
|
2031
|
+
* @param node 需要修改的节点
|
|
2032
|
+
* @param parent 对齐的父节点
|
|
2033
|
+
* @param distance
|
|
2034
|
+
*/
|
|
2035
|
+
alignLeft(node: Node, parent: Node, distance?: number): void;
|
|
2036
|
+
/**
|
|
2037
|
+
* 与目标右对齐
|
|
2038
|
+
* @param node 需要修改的节点
|
|
2039
|
+
* @param target 对齐目标
|
|
2040
|
+
* @param distance
|
|
2041
|
+
*/
|
|
2042
|
+
alignLeftWorld(node: Node, target: Node, distance?: number): void;
|
|
1943
2043
|
}
|
|
1944
|
-
declare
|
|
1945
|
-
|
|
1946
|
-
declare function parsePlist(plist: any, texture: any): SpriteAtlas;
|
|
1947
|
-
declare function loadAtlas(url: any, callback: any): void;
|
|
2044
|
+
declare var widgetutil: WidgetUtil;
|
|
1948
2045
|
|
|
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 };
|
|
2046
|
+
export { ArrayUtil, AssetLoader, AssetURI, BitUtil, CallbackList, CameraUtil, CanvasUtil, Controller, ControllerDict, ControllerSet, ConvertUtil, DictIterator, DictNode, DictSource, Dictionary, Dispatcher, DocUtil, 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, TreeUtil, UIManager, UIObjectDict, UIPoolConfig, UISingleConfig, UIUtil, ViewController, WidgetAlign, WidgetUtil, XAssetManager, XEvent, arrayutil, assetx, bitutil, camerautil, canvasutil, convertutil, ctrlrepo, docutil, errorutil, eventmgr, eventutil, floatutil, formatutil, geoutil, identutil, loadAtlas, logmgr, maputil, mathutil, netutil, pagerepo, parseAtlas, parsePlist, pathutil, randutil, resutil, scaleutil, stringutil, timer, timeutil, treeutil, uidict, uimgr, uiutil, widgetutil };
|
|
1950
2047
|
export type { CreatorFunction, DisposeFunction, IController, IError, IEventManager, IExtend, IListItem, IModel, IModule, IModuleSample, ITreeListItem, RecycleFunction };
|