vislite 0.4.1 → 0.5.0-alpha.0

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.
Files changed (180) hide show
  1. package/.editorconfig +18 -18
  2. package/AUTHORS.txt +6 -6
  3. package/CHANGELOG +13 -0
  4. package/LICENSE +20 -20
  5. package/README.md +69 -69
  6. package/lib/Buffer/index.umd.js +3 -3
  7. package/lib/Buffer/index.umd.min.js +3 -3
  8. package/lib/Canvas/index.umd.js +3 -3
  9. package/lib/Canvas/index.umd.min.js +3 -3
  10. package/lib/Cardinal/index.umd.js +3 -3
  11. package/lib/Cardinal/index.umd.min.js +3 -3
  12. package/lib/Eoap/index.umd.js +3 -3
  13. package/lib/Eoap/index.umd.min.js +3 -3
  14. package/lib/Geometry/index.umd.js +204 -0
  15. package/lib/Geometry/index.umd.min.js +11 -0
  16. package/lib/Hermite/index.umd.js +3 -3
  17. package/lib/Hermite/index.umd.min.js +3 -3
  18. package/lib/Matrix4/index.umd.js +3 -3
  19. package/lib/Matrix4/index.umd.min.js +3 -3
  20. package/lib/Mercator/index.umd.js +5 -4
  21. package/lib/Mercator/index.umd.min.js +4 -4
  22. package/lib/OralCanvas/index.es.js +3 -3
  23. package/lib/OralCanvas/index.es.min.js +3 -3
  24. package/lib/OralWebGL/index.es.js +11 -11
  25. package/lib/OralWebGL/index.es.min.js +4 -4
  26. package/lib/SVG/index.umd.js +4 -4
  27. package/lib/SVG/index.umd.min.js +4 -4
  28. package/lib/Shader/index.umd.js +11 -11
  29. package/lib/Shader/index.umd.min.js +4 -4
  30. package/lib/Texture/index.umd.js +3 -3
  31. package/lib/Texture/index.umd.min.js +3 -3
  32. package/lib/TreeLayout/index.umd.js +3 -3
  33. package/lib/TreeLayout/index.umd.min.js +3 -3
  34. package/lib/WebGL/index.umd.js +11 -11
  35. package/lib/WebGL/index.umd.min.js +4 -4
  36. package/lib/animation/index.umd.js +3 -3
  37. package/lib/animation/index.umd.min.js +3 -3
  38. package/lib/formatColor/index.umd.js +3 -3
  39. package/lib/formatColor/index.umd.min.js +3 -3
  40. package/lib/getLoopColors/index.umd.js +3 -3
  41. package/lib/getLoopColors/index.umd.min.js +3 -3
  42. package/lib/getWebGLContext/index.umd.js +3 -3
  43. package/lib/getWebGLContext/index.umd.min.js +3 -3
  44. package/lib/index.umd.js +154 -14
  45. package/lib/index.umd.min.js +4 -4
  46. package/lib/resizeObserver/index.umd.js +3 -3
  47. package/lib/resizeObserver/index.umd.min.js +3 -3
  48. package/lib/rotate/index.umd.js +3 -3
  49. package/lib/rotate/index.umd.min.js +3 -3
  50. package/lib/ruler/index.umd.js +3 -3
  51. package/lib/ruler/index.umd.min.js +3 -3
  52. package/lib/throttle/index.umd.js +3 -3
  53. package/lib/throttle/index.umd.min.js +3 -3
  54. package/lib/viewHandler/index.umd.js +3 -3
  55. package/lib/viewHandler/index.umd.min.js +3 -3
  56. package/miniprogram/ui-canvas/index.js +107 -107
  57. package/miniprogram/ui-canvas/index.json +4 -4
  58. package/miniprogram/ui-canvas/index.wxml +4 -4
  59. package/miniprogram/ui-canvas/index.wxss +5 -5
  60. package/package/Buffer/index.ts +2 -2
  61. package/package/Canvas/index.ts +2 -2
  62. package/package/Cardinal/index.ts +2 -2
  63. package/package/Eoap/index.ts +2 -2
  64. package/package/Geometry/index.ts +3 -0
  65. package/package/Hermite/index.ts +2 -2
  66. package/package/Matrix4/index.ts +2 -2
  67. package/package/Mercator/index.ts +2 -2
  68. package/package/OralCanvas/index.ts +2 -2
  69. package/package/OralWebGL/index.ts +2 -2
  70. package/package/SVG/index.ts +2 -2
  71. package/package/Shader/index.ts +39 -39
  72. package/package/Texture/index.ts +2 -2
  73. package/package/TreeLayout/index.ts +2 -2
  74. package/package/WebGL/index.ts +2 -2
  75. package/package/animation/index.ts +2 -2
  76. package/package/formatColor/index.ts +2 -2
  77. package/package/getLoopColors/index.ts +2 -2
  78. package/package/getWebGLContext/index.ts +39 -39
  79. package/package/index.ts +6 -1
  80. package/package/resizeObserver/index.ts +2 -2
  81. package/package/rotate/index.ts +2 -2
  82. package/package/ruler/index.ts +2 -2
  83. package/package/throttle/index.ts +2 -2
  84. package/package/viewHandler/index.ts +2 -2
  85. package/package.json +3 -1
  86. package/src/Canvas.ts +67 -67
  87. package/src/Eoap.ts +1 -1
  88. package/src/Geometry.ts +82 -0
  89. package/src/Matrix4/index.ts +2 -2
  90. package/src/Matrix4/move.ts +12 -12
  91. package/src/Matrix4/rotate.ts +15 -15
  92. package/src/Matrix4/scale.ts +11 -11
  93. package/src/Matrix4/transform.ts +64 -64
  94. package/src/Mercator.ts +3 -2
  95. package/src/SVG.ts +24 -24
  96. package/src/TreeLayout/index.ts +185 -185
  97. package/src/WebGL.ts +66 -66
  98. package/src/animation.ts +98 -98
  99. package/src/common/assemble.ts +22 -22
  100. package/src/common/canvas/arc.ts +50 -50
  101. package/src/common/canvas/config.ts +158 -158
  102. package/src/common/canvas/gradient.ts +29 -29
  103. package/src/common/canvas/index.ts +168 -168
  104. package/src/common/canvas/painter.ts +426 -426
  105. package/src/common/canvas/texts.ts +18 -18
  106. package/src/common/geometry/prism-horizontal.ts +34 -0
  107. package/src/common/geometry/prism-vertical.ts +40 -0
  108. package/src/common/geometry/sphere-fragment.ts +39 -0
  109. package/src/common/geometry/tool/circle.ts +12 -0
  110. package/src/common/mergeOption.ts +6 -6
  111. package/src/common/setStyle.ts +5 -5
  112. package/src/common/svg/config.ts +174 -174
  113. package/src/common/svg/index.ts +336 -336
  114. package/src/common/svg/tool.ts +44 -44
  115. package/src/common/tree/index.ts +25 -25
  116. package/src/common/tree/toInnerTree.ts +56 -56
  117. package/src/common/tree/toPlainTree.ts +131 -131
  118. package/src/common/webgl/buffer.ts +79 -79
  119. package/src/common/webgl/doDraw.ts +108 -108
  120. package/src/common/webgl/getColorFactory.ts +26 -26
  121. package/src/common/webgl/getShader.ts +48 -48
  122. package/src/common/webgl/getTexture.ts +11 -11
  123. package/src/common/webgl/getWebGLContext.ts +27 -27
  124. package/src/common/webgl/index.ts +223 -223
  125. package/src/common/webgl/shader.ts +75 -75
  126. package/src/common/webgl/texture.ts +96 -96
  127. package/src/formatColor.ts +44 -44
  128. package/src/getLoopColors.ts +42 -42
  129. package/src/interpolation/Cardinal.ts +110 -110
  130. package/src/interpolation/Hermite.ts +65 -65
  131. package/src/resizeObserver.ts +36 -36
  132. package/src/rotate.ts +1 -1
  133. package/src/ruler.ts +188 -188
  134. package/src/shader/fsColor.c +7 -7
  135. package/src/shader/fsColors.c +7 -7
  136. package/src/shader/fsCube.c +8 -8
  137. package/src/shader/fsImage.c +8 -8
  138. package/src/shader/vsColor.c +17 -17
  139. package/src/shader/vsColors.c +13 -13
  140. package/src/shader/vsCube.c +13 -13
  141. package/src/shader/vsImage.c +13 -13
  142. package/src/throttle.ts +51 -51
  143. package/src/viewHandler.ts +158 -158
  144. package/types/Buffer.d.ts +23 -23
  145. package/types/Canvas.d.ts +300 -300
  146. package/types/CanvasConfig.d.ts +82 -82
  147. package/types/CanvasOption.d.ts +7 -7
  148. package/types/Cardinal.d.ts +13 -13
  149. package/types/Geometry.d.ts +35 -0
  150. package/types/GeometryOption.d.ts +12 -0
  151. package/types/GeometryResult.d.ts +19 -0
  152. package/types/Gradient.d.ts +14 -14
  153. package/types/Hermite.d.ts +18 -18
  154. package/types/Map.d.ts +2 -2
  155. package/types/Matrix4.d.ts +4 -4
  156. package/types/Object3D.d.ts +114 -114
  157. package/types/SVG.d.ts +210 -210
  158. package/types/SVGConfig.d.ts +60 -60
  159. package/types/Scene3D.d.ts +6 -6
  160. package/types/Shader.d.ts +21 -21
  161. package/types/Texture.d.ts +16 -16
  162. package/types/Tree.d.ts +69 -69
  163. package/types/TreeConfig.d.ts +24 -24
  164. package/types/TreeLayout.d.ts +48 -48
  165. package/types/TreeOption.d.ts +48 -48
  166. package/types/WebGL.d.ts +38 -38
  167. package/types/WebGLOption.d.ts +7 -7
  168. package/types/animation.d.ts +6 -6
  169. package/types/formatColor.d.ts +2 -2
  170. package/types/getLoopColors.d.ts +2 -2
  171. package/types/getWebGLContext.d.ts +2 -2
  172. package/types/index.d.ts +15 -1
  173. package/types/painterConfig.d.ts +2 -2
  174. package/types/resizeObserver.d.ts +2 -2
  175. package/types/rotate.d.ts +1 -1
  176. package/types/ruler.d.ts +7 -7
  177. package/types/throttle.d.ts +4 -4
  178. package/types/throttleOption.d.ts +21 -21
  179. package/types/viewHandler.d.ts +13 -13
  180. package/uni-app/ui-canvas.vue +222 -222
package/types/Tree.d.ts CHANGED
@@ -1,70 +1,70 @@
1
- export interface TreeResultType {
2
-
3
- /**
4
- * 树的层数
5
- */
6
- deep: number
7
-
8
- node: {
9
- [id: string]: {
10
-
11
- /**
12
- * 当前结点的孩子的结点id集合
13
- */
14
- children: Array<string>
15
-
16
- /**
17
- * 当前结点的原始数据
18
- */
19
- data: any
20
-
21
- /**
22
- * 当前结点的id
23
- */
24
- id: string
25
-
26
- /**
27
- * 当前结点的父结点id
28
- */
29
- pid: string
30
-
31
- /**
32
- * 当前结点的横坐标
33
- */
34
- left: number
35
-
36
- /**
37
- * 当前结点的纵坐标
38
- */
39
- top: number,
40
-
41
- /**
42
- * 当前结点的打开还是关闭
43
- */
44
- isOpen: boolean,
45
-
46
- /**
47
- * 当前结点本身是否显示
48
- */
49
- show: boolean
50
- }
51
- }
52
-
53
- /**
54
- * 根结点id
55
- */
56
- root: string
57
-
58
- /**
59
- * 树的宽数
60
- */
61
- size: number
62
- }
63
-
64
- export default interface TreeType {
65
-
66
- /**
67
- * 求解单一值
68
- */
69
- use(initTree: any): TreeResultType
1
+ export interface TreeResultType {
2
+
3
+ /**
4
+ * 树的层数
5
+ */
6
+ deep: number
7
+
8
+ node: {
9
+ [id: string]: {
10
+
11
+ /**
12
+ * 当前结点的孩子的结点id集合
13
+ */
14
+ children: Array<string>
15
+
16
+ /**
17
+ * 当前结点的原始数据
18
+ */
19
+ data: any
20
+
21
+ /**
22
+ * 当前结点的id
23
+ */
24
+ id: string
25
+
26
+ /**
27
+ * 当前结点的父结点id
28
+ */
29
+ pid: string
30
+
31
+ /**
32
+ * 当前结点的横坐标
33
+ */
34
+ left: number
35
+
36
+ /**
37
+ * 当前结点的纵坐标
38
+ */
39
+ top: number,
40
+
41
+ /**
42
+ * 当前结点的打开还是关闭
43
+ */
44
+ isOpen: boolean,
45
+
46
+ /**
47
+ * 当前结点本身是否显示
48
+ */
49
+ show: boolean
50
+ }
51
+ }
52
+
53
+ /**
54
+ * 根结点id
55
+ */
56
+ root: string
57
+
58
+ /**
59
+ * 树的宽数
60
+ */
61
+ size: number
62
+ }
63
+
64
+ export default interface TreeType {
65
+
66
+ /**
67
+ * 求解单一值
68
+ */
69
+ use(initTree: any): TreeResultType
70
70
  }
@@ -1,25 +1,25 @@
1
- export default interface TreeConfigType {
2
-
3
- /**
4
- * 获取根结点的方法
5
- * @param initTree 原始数据
6
- * @returns 返回根结点
7
- */
8
- root?: (initTree: any) => any
9
-
10
- /**
11
- * 获取子结点的方法
12
- * @param parentTree 父结点
13
- * @param initTree 原始数据
14
- * @returns 返回当前父结点的所有子结点数组
15
- */
16
- children?: (parentTree: any, initTree: any) => any[]
17
-
18
- /**
19
- * 获取结点ID方法
20
- * @param treedata 当前结点
21
- * @returns 返回可以唯一标识当前结点的id
22
- */
23
- id?: (treedata: any) => string
24
-
1
+ export default interface TreeConfigType {
2
+
3
+ /**
4
+ * 获取根结点的方法
5
+ * @param initTree 原始数据
6
+ * @returns 返回根结点
7
+ */
8
+ root?: (initTree: any) => any
9
+
10
+ /**
11
+ * 获取子结点的方法
12
+ * @param parentTree 父结点
13
+ * @param initTree 原始数据
14
+ * @returns 返回当前父结点的所有子结点数组
15
+ */
16
+ children?: (parentTree: any, initTree: any) => any[]
17
+
18
+ /**
19
+ * 获取结点ID方法
20
+ * @param treedata 当前结点
21
+ * @returns 返回可以唯一标识当前结点的id
22
+ */
23
+ id?: (treedata: any) => string
24
+
25
25
  }
@@ -1,49 +1,49 @@
1
- import TreeType from "./Tree"
2
- import { TreeResultType } from "./Tree"
3
- import TreeOptionType from './TreeOption'
4
-
5
- export default interface TreeLayoutType extends TreeType {
6
-
7
- /**
8
- * 设置布局的行为
9
- * @param option
10
- */
11
- setOption(option: TreeOptionType): this
12
-
13
- /**
14
- * 单纯的树图坐标计算
15
- * @param initTree 原始数据
16
- */
17
- use(initTree: any, noOpens?: {}): TreeResultType
18
-
19
- /**
20
- * 绑定新的数据和渲染方法
21
- * @param initTree 原始数据
22
- * @param renderBack 渲染方法
23
- */
24
- bind(initTree: any, renderBack: (tree: TreeResultType) => void): this
25
-
26
- /**
27
- * 解除绑定
28
- */
29
- unbind(): this
30
-
31
- /**
32
- * 闭合指定节点
33
- * @param id
34
- */
35
- closeNode(id: string): this
36
-
37
- /**
38
- * 展开指定节点
39
- * @param id
40
- */
41
- openNode(id: string): this
42
-
43
- /**
44
- * 闭合或展开指定节点
45
- * @param id
46
- */
47
- toggleNode(id: string): this
48
-
1
+ import TreeType from "./Tree"
2
+ import { TreeResultType } from "./Tree"
3
+ import TreeOptionType from './TreeOption'
4
+
5
+ export default interface TreeLayoutType extends TreeType {
6
+
7
+ /**
8
+ * 设置布局的行为
9
+ * @param option
10
+ */
11
+ setOption(option: TreeOptionType): this
12
+
13
+ /**
14
+ * 单纯的树图坐标计算
15
+ * @param initTree 原始数据
16
+ */
17
+ use(initTree: any, noOpens?: {}): TreeResultType
18
+
19
+ /**
20
+ * 绑定新的数据和渲染方法
21
+ * @param initTree 原始数据
22
+ * @param renderBack 渲染方法
23
+ */
24
+ bind(initTree: any, renderBack: (tree: TreeResultType) => void): this
25
+
26
+ /**
27
+ * 解除绑定
28
+ */
29
+ unbind(): this
30
+
31
+ /**
32
+ * 闭合指定节点
33
+ * @param id
34
+ */
35
+ closeNode(id: string): this
36
+
37
+ /**
38
+ * 展开指定节点
39
+ * @param id
40
+ */
41
+ openNode(id: string): this
42
+
43
+ /**
44
+ * 闭合或展开指定节点
45
+ * @param id
46
+ */
47
+ toggleNode(id: string): this
48
+
49
49
  }
@@ -1,49 +1,49 @@
1
- export type treeType = "plain" | "rect" | "circle"
2
- export type treeDirectionType = "LR" | "RL" | "TB" | "BT"
3
-
4
- export default interface TreeOptionType {
5
-
6
- offsetX?: number
7
- offsetY?: number
8
-
9
- /**
10
- * 树图类型
11
- */
12
- type?: treeType
13
-
14
- /**
15
- * 设置成矩形树图(rect)时有效,表示树图方向
16
- */
17
- direction?: treeDirectionType
18
-
19
- /**
20
- * 树图x坐标
21
- */
22
- x?: number
23
-
24
- /**
25
- * 树图y坐标
26
- */
27
- y?: number
28
-
29
- /**
30
- * 设置成矩形树图(rect)时有效,表示矩形宽
31
- */
32
- width?: number
33
-
34
- /**
35
- * 设置成矩形树图(rect)时有效,表示矩形高
36
- */
37
- height?: number
38
-
39
- /**
40
- * 设置成圆树图(circle)时有效,表示圆树的半径
41
- */
42
- radius?: number
43
-
44
- /**
45
- * 切换时长
46
- */
47
- duration?: number
48
-
1
+ export type treeType = "plain" | "rect" | "circle"
2
+ export type treeDirectionType = "LR" | "RL" | "TB" | "BT"
3
+
4
+ export default interface TreeOptionType {
5
+
6
+ offsetX?: number
7
+ offsetY?: number
8
+
9
+ /**
10
+ * 树图类型
11
+ */
12
+ type?: treeType
13
+
14
+ /**
15
+ * 设置成矩形树图(rect)时有效,表示树图方向
16
+ */
17
+ direction?: treeDirectionType
18
+
19
+ /**
20
+ * 树图x坐标
21
+ */
22
+ x?: number
23
+
24
+ /**
25
+ * 树图y坐标
26
+ */
27
+ y?: number
28
+
29
+ /**
30
+ * 设置成矩形树图(rect)时有效,表示矩形宽
31
+ */
32
+ width?: number
33
+
34
+ /**
35
+ * 设置成矩形树图(rect)时有效,表示矩形高
36
+ */
37
+ height?: number
38
+
39
+ /**
40
+ * 设置成圆树图(circle)时有效,表示圆树的半径
41
+ */
42
+ radius?: number
43
+
44
+ /**
45
+ * 切换时长
46
+ */
47
+ duration?: number
48
+
49
49
  }
package/types/WebGL.d.ts CHANGED
@@ -1,39 +1,39 @@
1
- import Object3DType from './Object3D'
2
- import Matrix4Type from './Matrix4'
3
-
4
- export default interface WebGLType {
5
-
6
- matrix(initMatrix4?: number[]): Matrix4Type
7
-
8
- /**
9
- * 使用模型数据绘制
10
- * @param object3D 记录着的模型数据
11
- */
12
- render(object3D: Object3DType): void
13
-
14
- /**
15
- * 重新绘制
16
- */
17
- review(): this
18
-
19
- /**
20
- * 返回变换矩阵
21
- */
22
- getMatrix(): Matrix4Type
23
-
24
- /**
25
- * 返回所有的Object3D内容
26
- */
27
- getObject3D(): Object3DType[]
28
-
29
- /**
30
- * 设置区域
31
- */
32
- setRegion(regionName: string | number): this
33
-
34
- /**
35
- * 获取区域
36
- */
37
- getRegion(x: number, y: number): Promise<string>
38
-
1
+ import Object3DType from './Object3D'
2
+ import Matrix4Type from './Matrix4'
3
+
4
+ export default interface WebGLType {
5
+
6
+ matrix(initMatrix4?: number[]): Matrix4Type
7
+
8
+ /**
9
+ * 使用模型数据绘制
10
+ * @param object3D 记录着的模型数据
11
+ */
12
+ render(object3D: Object3DType): void
13
+
14
+ /**
15
+ * 重新绘制
16
+ */
17
+ review(): this
18
+
19
+ /**
20
+ * 返回变换矩阵
21
+ */
22
+ getMatrix(): Matrix4Type
23
+
24
+ /**
25
+ * 返回所有的Object3D内容
26
+ */
27
+ getObject3D(): Object3DType[]
28
+
29
+ /**
30
+ * 设置区域
31
+ */
32
+ setRegion(regionName: string | number): this
33
+
34
+ /**
35
+ * 获取区域
36
+ */
37
+ getRegion(x: number, y: number): Promise<string>
38
+
39
39
  }
@@ -1,8 +1,8 @@
1
- export default interface WebGLOptionType {
2
-
3
- /**
4
- * 是否支持区域管理,默认true
5
- */
6
- region?: boolean
7
-
1
+ export default interface WebGLOptionType {
2
+
3
+ /**
4
+ * 是否支持区域管理,默认true
5
+ */
6
+ region?: boolean
7
+
8
8
  }
@@ -1,7 +1,7 @@
1
- interface animationFun {
2
- (deep: number): void
3
- }
4
-
5
- export default interface animationType {
6
- (doback: animationFun, duration?: number, callback?: animationFun): Function
1
+ interface animationFun {
2
+ (deep: number): void
3
+ }
4
+
5
+ export default interface animationType {
6
+ (doback: animationFun, duration?: number, callback?: animationFun): Function
7
7
  }
@@ -1,3 +1,3 @@
1
- export default interface formatColor {
2
- (color: string, format: string): number[] | string
1
+ export default interface formatColor {
2
+ (color: string, format: string): number[] | string
3
3
  }
@@ -1,3 +1,3 @@
1
- export default interface getLoopColorsType {
2
- (num: number, alpha?: number): string[]
1
+ export default interface getLoopColorsType {
2
+ (num: number, alpha?: number): string[]
3
3
  }
@@ -1,3 +1,3 @@
1
- export default interface getWebGLContextType {
2
- (el: HTMLElement | null, scale?: number): WebGLRenderingContext
1
+ export default interface getWebGLContextType {
2
+ (el: HTMLElement | null, scale?: number): WebGLRenderingContext
3
3
  }
package/types/index.d.ts CHANGED
@@ -30,6 +30,9 @@ import resizeObserverType from './resizeObserver'
30
30
  import TreeLayoutType from './TreeLayout'
31
31
  import TreeConfigType from './TreeConfig'
32
32
 
33
+ import GeometryType from './Geometry'
34
+ import GeometryOptionType from './GeometryOption'
35
+
33
36
  // 插值
34
37
  interface NewCardinalType extends CardinalType {
35
38
  new(t?: number): this
@@ -78,6 +81,11 @@ interface NewTreeLayoutType extends TreeLayoutType {
78
81
  new(config?: TreeConfigType): this
79
82
  }
80
83
 
84
+ // 几何&模型数据
85
+ interface NewGeometryType extends GeometryType {
86
+ new(option?: GeometryOptionType): this
87
+ }
88
+
81
89
  export default class VISLite {
82
90
 
83
91
  // 插值
@@ -116,6 +124,9 @@ export default class VISLite {
116
124
 
117
125
  // 布局
118
126
  static TreeLayout: NewTreeLayoutType
127
+
128
+ // 几何&模型数据
129
+ static Geometry: NewGeometryType
119
130
  }
120
131
 
121
132
  // 插值
@@ -153,4 +164,7 @@ export let throttle: throttleType
153
164
  export let resizeObserver: resizeObserverType
154
165
 
155
166
  // 布局
156
- export let TreeLayout: NewTreeLayoutType
167
+ export let TreeLayout: NewTreeLayoutType
168
+
169
+ // 几何&模型数据
170
+ export let Geometry: NewGeometryType
@@ -1,3 +1,3 @@
1
- export type arcCapType = "butt" | "round" | "-round"
2
- export type textAlignType = "left" | "center" | "right"
1
+ export type arcCapType = "butt" | "round" | "-round"
2
+ export type textAlignType = "left" | "center" | "right"
3
3
  export type textBaselineType = "top" | "middle" | "bottom"
@@ -1,3 +1,3 @@
1
- export default interface resizeObserver {
2
- (el: HTMLElement | null, callback: Function): Function
1
+ export default interface resizeObserver {
2
+ (el: HTMLElement | null, callback: Function): Function
3
3
  }
package/types/rotate.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export default interface rotateType {
2
- (cx: number, cy: number, deg: number, x: number, y: number): number[]
2
+ (cx: number, cy: number, deg: number, x: number, y: number): [number, number]
3
3
  }
package/types/ruler.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- export interface rulerOptionType {
2
- max?: number
3
- min?: number
4
- }
5
-
6
- export default interface rulerType {
7
- (maxValue: number, minValue: number, num: number, option?: rulerOptionType): number[]
1
+ export interface rulerOptionType {
2
+ max?: number
3
+ min?: number
4
+ }
5
+
6
+ export default interface rulerType {
7
+ (maxValue: number, minValue: number, num: number, option?: rulerOptionType): number[]
8
8
  }
@@ -1,5 +1,5 @@
1
- import throttleOptionType from './throttleOption'
2
-
3
- export default interface throttle {
4
- (callback: Function, option?: throttleOptionType): Function
1
+ import throttleOptionType from './throttleOption'
2
+
3
+ export default interface throttle {
4
+ (callback: Function, option?: throttleOptionType): Function
5
5
  }
@@ -1,22 +1,22 @@
1
- export type throttleOpportunityType = "begin" | "end" | "wide"
2
-
3
- export default interface throttleOptionType {
4
-
5
- /**
6
- * 节流时长
7
- */
8
- time?: number
9
-
10
- /**
11
- * 是否持续节流
12
- */
13
- keep?: boolean
14
-
15
- /**
16
- * 执行时机
17
- *
18
- * begin(开始触发)、end(结束触发)、wide(第一次开始触发,其余结束触发)
19
- */
20
- opportunity?: throttleOpportunityType
21
-
1
+ export type throttleOpportunityType = "begin" | "end" | "wide"
2
+
3
+ export default interface throttleOptionType {
4
+
5
+ /**
6
+ * 节流时长
7
+ */
8
+ time?: number
9
+
10
+ /**
11
+ * 是否持续节流
12
+ */
13
+ keep?: boolean
14
+
15
+ /**
16
+ * 执行时机
17
+ *
18
+ * begin(开始触发)、end(结束触发)、wide(第一次开始触发,其余结束触发)
19
+ */
20
+ opportunity?: throttleOpportunityType
21
+
22
22
  }
@@ -1,14 +1,14 @@
1
- export interface paramsType {
2
- type: string
3
- value: number,
4
- normal: number[],
5
- event: Event
6
- }
7
-
8
- export interface callbackFun {
9
- (params: paramsType): void
10
- }
11
-
12
- export default interface viewHandlerType {
13
- (callback: callbackFun): void
1
+ export interface paramsType {
2
+ type: string
3
+ value: number,
4
+ normal: number[],
5
+ event: Event
6
+ }
7
+
8
+ export interface callbackFun {
9
+ (params: paramsType): void
10
+ }
11
+
12
+ export default interface viewHandlerType {
13
+ (callback: callbackFun): void
14
14
  }