vislite 1.2.0-beta.0 → 1.2.1-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 (78) hide show
  1. package/CHANGELOG +279 -274
  2. package/README.md +175 -175
  3. package/lib/Buffer/index.es.js +1 -1
  4. package/lib/Buffer/index.es.min.js +1 -1
  5. package/lib/Canvas/index.es.js +1 -1
  6. package/lib/Canvas/index.es.min.js +1 -1
  7. package/lib/Cardinal/index.es.js +1 -1
  8. package/lib/Cardinal/index.es.min.js +1 -1
  9. package/lib/Eoap/index.es.js +1 -1
  10. package/lib/Eoap/index.es.min.js +1 -1
  11. package/lib/Hermite/index.es.js +1 -1
  12. package/lib/Hermite/index.es.min.js +1 -1
  13. package/lib/Matrix4/index.es.js +1 -1
  14. package/lib/Matrix4/index.es.min.js +1 -1
  15. package/lib/Mercator/index.es.js +1 -1
  16. package/lib/Mercator/index.es.min.js +1 -1
  17. package/lib/RawCanvas/index.es.js +1 -1
  18. package/lib/RawCanvas/index.es.min.js +1 -1
  19. package/lib/SVG/index.es.js +1 -1
  20. package/lib/SVG/index.es.min.js +1 -1
  21. package/lib/Shader/index.es.js +1 -1
  22. package/lib/Shader/index.es.min.js +1 -1
  23. package/lib/Texture/index.es.js +1 -1
  24. package/lib/Texture/index.es.min.js +1 -1
  25. package/lib/TreeLayout/index.es.js +1 -1
  26. package/lib/TreeLayout/index.es.min.js +1 -1
  27. package/lib/animation/index.es.js +1 -1
  28. package/lib/animation/index.es.min.js +1 -1
  29. package/lib/assemble/index.es.js +1 -1
  30. package/lib/assemble/index.es.min.js +1 -1
  31. package/lib/getLoopColors/index.es.js +1 -1
  32. package/lib/getLoopColors/index.es.min.js +1 -1
  33. package/lib/getWebGLContext/index.es.js +1 -1
  34. package/lib/getWebGLContext/index.es.min.js +1 -1
  35. package/lib/index.umd.js +1 -1
  36. package/lib/index.umd.min.js +1 -1
  37. package/lib/initOption/index.es.js +1 -1
  38. package/lib/initOption/index.es.min.js +1 -1
  39. package/lib/mergeOption/index.es.js +1 -1
  40. package/lib/mergeOption/index.es.min.js +1 -1
  41. package/lib/move/index.es.js +1 -1
  42. package/lib/move/index.es.min.js +1 -1
  43. package/lib/rotate/index.es.js +1 -1
  44. package/lib/rotate/index.es.min.js +1 -1
  45. package/lib/ruler/index.es.js +1 -1
  46. package/lib/ruler/index.es.min.js +1 -1
  47. package/lib/scale/index.es.js +1 -1
  48. package/lib/scale/index.es.min.js +1 -1
  49. package/lib/throttle/index.es.js +1 -1
  50. package/lib/throttle/index.es.min.js +1 -1
  51. package/minialipay/ui-canvas/drawImage.js +35 -35
  52. package/minialipay/ui-canvas/index.acss +4 -4
  53. package/minialipay/ui-canvas/index.axml +3 -3
  54. package/minialipay/ui-canvas/index.d.ts +1 -1
  55. package/minialipay/ui-canvas/index.js +100 -100
  56. package/minialipay/ui-canvas/index.json +6 -6
  57. package/miniprogram/ui-canvas/index.js +117 -117
  58. package/package.json +2 -2
  59. package/src/Canvas.ts +84 -84
  60. package/src/common/canvas/default.ts +61 -61
  61. package/src/common/canvas/gradient.ts +31 -31
  62. package/src/common/canvas/index.ts +188 -188
  63. package/src/common/canvas/painter.ts +430 -430
  64. package/src/common/svg/config.ts +194 -194
  65. package/src/common/svg/default.ts +26 -26
  66. package/src/common/svg/index.ts +332 -332
  67. package/src/common/svg/tool.ts +42 -42
  68. package/src/common/type.ts +26 -26
  69. package/src/getLoopColors.ts +42 -42
  70. package/types/Canvas.d.ts +344 -344
  71. package/types/CanvasConfig.d.ts +116 -116
  72. package/types/SVGConfig.d.ts +89 -89
  73. package/types/assemble.d.ts +5 -5
  74. package/types/getLoopColors.d.ts +5 -5
  75. package/types/index.d.ts +165 -160
  76. package/types/option.d.ts +12 -12
  77. package/types/painterConfig.d.ts +4 -4
  78. package/types/uni-canvas.d.ts +3 -3
@@ -1,117 +1,117 @@
1
- import { arcCapType, textAlignType, textBaselineType, lineCapType, lineJoinType } from './painterConfig'
2
-
3
- export default interface CanvasConfigType {
4
-
5
- /**
6
- * 填充色或图案,默认"#000"
7
- */
8
- fillStyle?: string | CanvasGradient
9
-
10
- /**
11
- * 轮廓色或图案,默认"#000"
12
- */
13
- strokeStyle?: string | CanvasGradient
14
-
15
- /**
16
- * 线条宽度,默认1(单位px)
17
- */
18
- lineWidth?: number
19
-
20
- /**
21
- * 线的端点类型,默认"butt"平直边缘(还有"round"半圆和"square"矩形)
22
- */
23
- lineCap?: lineCapType
24
-
25
- /**
26
- * 线的拐角连接方式,默认"miter"连接处边缘延长相接(还有"bevel"对角线斜角和"round"圆)
27
- */
28
- lineJoin?: lineJoinType
29
-
30
- /**
31
- * 设置线条虚线,默认为[]表示使用实线绘制
32
- *
33
- * 值应该是一个数组,格式:[实线长,虚线长,实线长 ...],数组长度任意,会自动循环
34
- */
35
- lineDash?: Array<number>
36
-
37
- /**
38
- * 文字水平对齐方式,默认"left"左对齐(还有"center"居中和"right"右对齐)
39
- */
40
- textAlign?: textAlignType
41
-
42
- /**
43
- * 文字垂直对齐方式,默认"middle"垂直居中(还有"top"上对齐和"bottom"下对齐)
44
- */
45
- textBaseline?: textBaselineType
46
-
47
- /**
48
- * 阴影的模糊系数,默认0,也就是无阴影
49
- */
50
- shadowBlur?: number
51
-
52
- /**
53
- * 阴影的颜色
54
- */
55
- shadowColor?: string | CanvasGradient
56
-
57
- /**
58
- * 文字大小,默认16
59
- */
60
- "fontSize"?: number
61
-
62
- /**
63
- * 已废弃,向下兼容,请用 fontSize 代替
64
- */
65
- "font-size"?: number // 向下兼容
66
-
67
- /**
68
- * 字体,默认"sans-serif"
69
- */
70
- "fontFamily"?: string
71
-
72
- /**
73
- * 已废弃,向下兼容,请用 fontFamily 代替
74
- */
75
- "font-family"?: string // 向下兼容
76
-
77
- /**
78
- * 字重,默认400
79
- */
80
- "fontWeight"?: number
81
-
82
- /**
83
- * 已废弃,向下兼容,请用 fontWeight 代替
84
- */
85
- "font-weight"?: number // 向下兼容
86
-
87
- /**
88
- * 字类型,默认"normal"
89
- */
90
- "fontStyle"?: string
91
-
92
- /**
93
- * 已废弃,向下兼容,请用 fontStyle 代替
94
- */
95
- "font-style"?: string // 向下兼容
96
-
97
- /**
98
- * 圆弧开始端闭合方式,默认"butt"直线闭合(还有"round"圆帽闭合,"-round"反圆帽闭合)
99
- */
100
- "arcStartCap"?: arcCapType
101
-
102
- /**
103
- * 已废弃,向下兼容,请用 arcStartCap 代替
104
- */
105
- "arc-start-cap"?: string // 向下兼容
106
-
107
- /**
108
- * 圆弧结束端闭合方式,默认"butt"直线闭合(还有"round"圆帽闭合,"-round"反圆帽闭合)
109
- */
110
- "arcEndCap"?: arcCapType
111
-
112
- /**
113
- * 已废弃,向下兼容,请用 arcEndCap 代替
114
- */
115
- "arc-end-cap"?: string // 向下兼容
116
-
1
+ import { arcCapType, textAlignType, textBaselineType, lineCapType, lineJoinType } from './painterConfig'
2
+
3
+ export default interface CanvasConfigType {
4
+
5
+ /**
6
+ * 填充色或图案,默认"#000"
7
+ */
8
+ fillStyle?: string | CanvasGradient
9
+
10
+ /**
11
+ * 轮廓色或图案,默认"#000"
12
+ */
13
+ strokeStyle?: string | CanvasGradient
14
+
15
+ /**
16
+ * 线条宽度,默认1(单位px)
17
+ */
18
+ lineWidth?: number
19
+
20
+ /**
21
+ * 线的端点类型,默认"butt"平直边缘(还有"round"半圆和"square"矩形)
22
+ */
23
+ lineCap?: lineCapType
24
+
25
+ /**
26
+ * 线的拐角连接方式,默认"miter"连接处边缘延长相接(还有"bevel"对角线斜角和"round"圆)
27
+ */
28
+ lineJoin?: lineJoinType
29
+
30
+ /**
31
+ * 设置线条虚线,默认为[]表示使用实线绘制
32
+ *
33
+ * 值应该是一个数组,格式:[实线长,虚线长,实线长 ...],数组长度任意,会自动循环
34
+ */
35
+ lineDash?: Array<number>
36
+
37
+ /**
38
+ * 文字水平对齐方式,默认"left"左对齐(还有"center"居中和"right"右对齐)
39
+ */
40
+ textAlign?: textAlignType
41
+
42
+ /**
43
+ * 文字垂直对齐方式,默认"middle"垂直居中(还有"top"上对齐和"bottom"下对齐)
44
+ */
45
+ textBaseline?: textBaselineType
46
+
47
+ /**
48
+ * 阴影的模糊系数,默认0,也就是无阴影
49
+ */
50
+ shadowBlur?: number
51
+
52
+ /**
53
+ * 阴影的颜色
54
+ */
55
+ shadowColor?: string | CanvasGradient
56
+
57
+ /**
58
+ * 文字大小,默认16
59
+ */
60
+ "fontSize"?: number
61
+
62
+ /**
63
+ * 已废弃,向下兼容,请用 fontSize 代替
64
+ */
65
+ "font-size"?: number // 向下兼容
66
+
67
+ /**
68
+ * 字体,默认"sans-serif"
69
+ */
70
+ "fontFamily"?: string
71
+
72
+ /**
73
+ * 已废弃,向下兼容,请用 fontFamily 代替
74
+ */
75
+ "font-family"?: string // 向下兼容
76
+
77
+ /**
78
+ * 字重,默认400
79
+ */
80
+ "fontWeight"?: number
81
+
82
+ /**
83
+ * 已废弃,向下兼容,请用 fontWeight 代替
84
+ */
85
+ "font-weight"?: number // 向下兼容
86
+
87
+ /**
88
+ * 字类型,默认"normal"
89
+ */
90
+ "fontStyle"?: string
91
+
92
+ /**
93
+ * 已废弃,向下兼容,请用 fontStyle 代替
94
+ */
95
+ "font-style"?: string // 向下兼容
96
+
97
+ /**
98
+ * 圆弧开始端闭合方式,默认"butt"直线闭合(还有"round"圆帽闭合,"-round"反圆帽闭合)
99
+ */
100
+ "arcStartCap"?: arcCapType
101
+
102
+ /**
103
+ * 已废弃,向下兼容,请用 arcStartCap 代替
104
+ */
105
+ "arc-start-cap"?: string // 向下兼容
106
+
107
+ /**
108
+ * 圆弧结束端闭合方式,默认"butt"直线闭合(还有"round"圆帽闭合,"-round"反圆帽闭合)
109
+ */
110
+ "arcEndCap"?: arcCapType
111
+
112
+ /**
113
+ * 已废弃,向下兼容,请用 arcEndCap 代替
114
+ */
115
+ "arc-end-cap"?: string // 向下兼容
116
+
117
117
  }
@@ -1,90 +1,90 @@
1
- import { arcCapType, textAlignType, textBaselineType, lineCapType, lineJoinType } from './painterConfig'
2
-
3
- export type svgElType = SVGElement | "g" | "text" | "path" | "circle" | "rect" | "polygon" | "polyline"
4
- export type svgBoardType = SVGElement | "text" | "path" | "arc" | "circle" | "rect"
5
-
6
- export default interface SVGConfigType {
7
-
8
- /**
9
- * 填充色或图案,默认"#000"
10
- */
11
- fillStyle?: string
12
-
13
- /**
14
- * 轮廓色或图案,默认"#000"
15
- */
16
- strokeStyle?: string
17
-
18
- /**
19
- * 线条宽度,默认1(单位px)
20
- */
21
- lineWidth?: number
22
-
23
- /**
24
- * 线的端点类型,默认"butt"平直边缘(还有"round"半圆和"square"矩形)
25
- */
26
- lineCap?: lineCapType
27
-
28
- /**
29
- * 线的拐角连接方式,默认"miter"连接处边缘延长相接(还有"bevel"对角线斜角和"round"圆)
30
- */
31
- lineJoin?: lineJoinType
32
-
33
- /**
34
- * 设置线条虚线,默认为[]表示使用实线绘制
35
- *
36
- * 值应该是一个数组,格式:[实线长,虚线长,实线长 ...],数组长度任意,会自动循环
37
- */
38
- lineDash?: Array<number>
39
-
40
- /**
41
- * 文字水平对齐方式,默认"left"左对齐(还有"center"居中和"right"右对齐)
42
- */
43
- textAlign?: textAlignType
44
-
45
- /**
46
- * 文字垂直对齐方式,默认"middle"垂直居中(还有"top"上对齐和"bottom"下对齐)
47
- */
48
- textBaseline?: textBaselineType
49
-
50
- /**
51
- * 文字大小,默认16
52
- */
53
- "fontSize"?: number
54
-
55
- /**
56
- * 已废弃,向下兼容,请用 fontSize 代替
57
- */
58
- "font-size"?: number // 向下兼容
59
-
60
- /**
61
- * 字体,默认"sans-serif"
62
- */
63
- "fontFamily"?: string
64
-
65
- /**
66
- * 已废弃,向下兼容,请用 fontFamily 代替
67
- */
68
- "font-family"?: string // 向下兼容
69
-
70
- /**
71
- * 圆弧开始端闭合方式,默认"butt"直线闭合(还有"round"圆帽闭合,"-round"反圆帽闭合)
72
- */
73
- "arcStartCap"?: arcCapType
74
-
75
- /**
76
- * 已废弃,向下兼容,请用 arcStartCap 代替
77
- */
78
- "arc-start-cap"?: string // 向下兼容
79
-
80
- /**
81
- * 圆弧结束端闭合方式,默认"butt"直线闭合(还有"round"圆帽闭合,"-round"反圆帽闭合)
82
- */
83
- "arcEndCap"?: arcCapType
84
-
85
- /**
86
- * 已废弃,向下兼容,请用 arcEndCap 代替
87
- */
88
- "arc-end-cap"?: string // 向下兼容
89
-
1
+ import { arcCapType, textAlignType, textBaselineType, lineCapType, lineJoinType } from './painterConfig'
2
+
3
+ export type svgElType = SVGElement | "g" | "text" | "path" | "circle" | "rect" | "polygon" | "polyline"
4
+ export type svgBoardType = SVGElement | "text" | "path" | "arc" | "circle" | "rect"
5
+
6
+ export default interface SVGConfigType {
7
+
8
+ /**
9
+ * 填充色或图案,默认"#000"
10
+ */
11
+ fillStyle?: string
12
+
13
+ /**
14
+ * 轮廓色或图案,默认"#000"
15
+ */
16
+ strokeStyle?: string
17
+
18
+ /**
19
+ * 线条宽度,默认1(单位px)
20
+ */
21
+ lineWidth?: number
22
+
23
+ /**
24
+ * 线的端点类型,默认"butt"平直边缘(还有"round"半圆和"square"矩形)
25
+ */
26
+ lineCap?: lineCapType
27
+
28
+ /**
29
+ * 线的拐角连接方式,默认"miter"连接处边缘延长相接(还有"bevel"对角线斜角和"round"圆)
30
+ */
31
+ lineJoin?: lineJoinType
32
+
33
+ /**
34
+ * 设置线条虚线,默认为[]表示使用实线绘制
35
+ *
36
+ * 值应该是一个数组,格式:[实线长,虚线长,实线长 ...],数组长度任意,会自动循环
37
+ */
38
+ lineDash?: Array<number>
39
+
40
+ /**
41
+ * 文字水平对齐方式,默认"left"左对齐(还有"center"居中和"right"右对齐)
42
+ */
43
+ textAlign?: textAlignType
44
+
45
+ /**
46
+ * 文字垂直对齐方式,默认"middle"垂直居中(还有"top"上对齐和"bottom"下对齐)
47
+ */
48
+ textBaseline?: textBaselineType
49
+
50
+ /**
51
+ * 文字大小,默认16
52
+ */
53
+ "fontSize"?: number
54
+
55
+ /**
56
+ * 已废弃,向下兼容,请用 fontSize 代替
57
+ */
58
+ "font-size"?: number // 向下兼容
59
+
60
+ /**
61
+ * 字体,默认"sans-serif"
62
+ */
63
+ "fontFamily"?: string
64
+
65
+ /**
66
+ * 已废弃,向下兼容,请用 fontFamily 代替
67
+ */
68
+ "font-family"?: string // 向下兼容
69
+
70
+ /**
71
+ * 圆弧开始端闭合方式,默认"butt"直线闭合(还有"round"圆帽闭合,"-round"反圆帽闭合)
72
+ */
73
+ "arcStartCap"?: arcCapType
74
+
75
+ /**
76
+ * 已废弃,向下兼容,请用 arcStartCap 代替
77
+ */
78
+ "arc-start-cap"?: string // 向下兼容
79
+
80
+ /**
81
+ * 圆弧结束端闭合方式,默认"butt"直线闭合(还有"round"圆帽闭合,"-round"反圆帽闭合)
82
+ */
83
+ "arcEndCap"?: arcCapType
84
+
85
+ /**
86
+ * 已废弃,向下兼容,请用 arcEndCap 代替
87
+ */
88
+ "arc-end-cap"?: string // 向下兼容
89
+
90
90
  }
@@ -1,6 +1,6 @@
1
- /**
2
- * 步进生成器
3
- */
4
- export default interface assembleType {
5
- (begin: number, end: number, step: number, count: number): () => Array<number>
1
+ /**
2
+ * 步进生成器
3
+ */
4
+ export default interface assembleType {
5
+ (begin: number, end: number, step: number, count: number): () => Array<number>
6
6
  }
@@ -1,6 +1,6 @@
1
- /**
2
- * 获取一组循环色彩
3
- */
4
- export default interface getLoopColorsType {
5
- (num: number, alpha?: number, colorsFactory?: (alpha: number) => Array<string>): string[]
1
+ /**
2
+ * 获取一组循环色彩
3
+ */
4
+ export default interface getLoopColorsType {
5
+ (num: number, alpha?: number, colorsFactory?: (alpha: number) => Array<string>): string[]
6
6
  }