vislite 1.2.0-alpha.2 → 1.2.0-alpha.3
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/CHANGELOG +257 -254
- package/lib/Buffer/index.es.js +1 -1
- package/lib/Buffer/index.es.min.js +1 -1
- package/lib/Canvas/index.es.js +13 -4
- package/lib/Canvas/index.es.min.js +2 -2
- package/lib/Cardinal/index.es.js +1 -1
- package/lib/Cardinal/index.es.min.js +1 -1
- package/lib/Eoap/index.es.js +1 -1
- package/lib/Eoap/index.es.min.js +1 -1
- package/lib/Hermite/index.es.js +1 -1
- package/lib/Hermite/index.es.min.js +1 -1
- package/lib/Matrix4/index.es.js +1 -1
- package/lib/Matrix4/index.es.min.js +1 -1
- package/lib/Mercator/index.es.js +1 -1
- package/lib/Mercator/index.es.min.js +1 -1
- package/lib/RawCanvas/index.es.js +12 -3
- package/lib/RawCanvas/index.es.min.js +2 -2
- package/lib/SVG/index.es.js +1 -1
- package/lib/SVG/index.es.min.js +1 -1
- package/lib/Shader/index.es.js +1 -1
- package/lib/Shader/index.es.min.js +1 -1
- package/lib/Texture/index.es.js +1 -1
- package/lib/Texture/index.es.min.js +1 -1
- package/lib/TreeLayout/index.es.js +1 -1
- package/lib/TreeLayout/index.es.min.js +1 -1
- package/lib/animation/index.es.js +1 -1
- package/lib/animation/index.es.min.js +1 -1
- package/lib/assemble/index.es.js +1 -1
- package/lib/assemble/index.es.min.js +1 -1
- package/lib/getLoopColors/index.es.js +1 -1
- package/lib/getLoopColors/index.es.min.js +1 -1
- package/lib/getWebGLContext/index.es.js +1 -1
- package/lib/getWebGLContext/index.es.min.js +1 -1
- package/lib/index.umd.js +13 -4
- package/lib/index.umd.min.js +2 -2
- package/lib/initOption/index.es.js +1 -1
- package/lib/initOption/index.es.min.js +1 -1
- package/lib/mergeOption/index.es.js +1 -1
- package/lib/mergeOption/index.es.min.js +1 -1
- package/lib/move/index.es.js +1 -1
- package/lib/move/index.es.min.js +1 -1
- package/lib/rotate/index.es.js +1 -1
- package/lib/rotate/index.es.min.js +1 -1
- package/lib/ruler/index.es.js +1 -1
- package/lib/ruler/index.es.min.js +1 -1
- package/lib/scale/index.es.js +1 -1
- package/lib/scale/index.es.min.js +1 -1
- package/lib/throttle/index.es.js +1 -1
- package/lib/throttle/index.es.min.js +1 -1
- package/miniprogram/ui-canvas/index.js +115 -115
- package/package.json +1 -1
- package/src/Canvas.ts +84 -84
- package/src/common/canvas/gradient.ts +32 -24
- package/src/common/canvas/index.ts +182 -177
- package/types/Canvas.d.ts +10 -1
- package/types/index.d.ts +160 -158
- package/types/uni-canvas.d.ts +4 -0
package/types/index.d.ts
CHANGED
|
@@ -1,159 +1,161 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import
|
|
17
|
-
|
|
18
|
-
import
|
|
19
|
-
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
|
|
23
|
-
import
|
|
24
|
-
|
|
25
|
-
import
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
import
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
import
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
static
|
|
88
|
-
static
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
static
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
static
|
|
103
|
-
static
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
export let
|
|
129
|
-
export let
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
export let
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
export let
|
|
144
|
-
export let
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
1
|
+
/// <reference path="./uni-canvas.d.ts" />
|
|
2
|
+
|
|
3
|
+
import CardinalType from './Cardinal'
|
|
4
|
+
import HermiteType from './Hermite'
|
|
5
|
+
|
|
6
|
+
import Matrix4Type from './Matrix4'
|
|
7
|
+
import rotateType from './rotate'
|
|
8
|
+
import moveType from './move'
|
|
9
|
+
import scaleType from './scale'
|
|
10
|
+
|
|
11
|
+
import getLoopColorsType from './getLoopColors'
|
|
12
|
+
import animationType from './animation'
|
|
13
|
+
import rulerType from './ruler'
|
|
14
|
+
|
|
15
|
+
import SVGType from './SVG'
|
|
16
|
+
import CanvasType from './Canvas'
|
|
17
|
+
|
|
18
|
+
import CanvasOptionType from './CanvasOption'
|
|
19
|
+
|
|
20
|
+
import getWebGLContextType from './getWebGLContext'
|
|
21
|
+
import ShaderType from './Shader'
|
|
22
|
+
import BufferType from './Buffer'
|
|
23
|
+
import TextureType from './Texture'
|
|
24
|
+
|
|
25
|
+
import MapType from './Map'
|
|
26
|
+
|
|
27
|
+
import throttleType from './throttle'
|
|
28
|
+
import assembleType from './assemble'
|
|
29
|
+
|
|
30
|
+
import TreeLayoutType from './TreeLayout'
|
|
31
|
+
import TreeConfigType from './TreeConfig'
|
|
32
|
+
|
|
33
|
+
import { initOptionType, mergeOptionType } from './option'
|
|
34
|
+
|
|
35
|
+
// 插值
|
|
36
|
+
interface NewCardinalType extends CardinalType {
|
|
37
|
+
new(t?: number): this
|
|
38
|
+
}
|
|
39
|
+
interface NewHermiteType extends HermiteType {
|
|
40
|
+
new(u?: number): this
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// 变换
|
|
44
|
+
interface NewMatrix4Type extends Matrix4Type {
|
|
45
|
+
new(initMatrix4?: number[]): this
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// 画笔
|
|
49
|
+
interface NewSVGType extends SVGType {
|
|
50
|
+
new(el: HTMLElement | null): this
|
|
51
|
+
}
|
|
52
|
+
interface NewCanvasType extends CanvasType {
|
|
53
|
+
new(el: HTMLElement | null, option?: CanvasOptionType, width?: number, height?: number): this
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// WebGL
|
|
57
|
+
interface NewShaderType extends ShaderType {
|
|
58
|
+
new(painter: WebGLRenderingContext): this
|
|
59
|
+
}
|
|
60
|
+
interface NewBufferType extends BufferType {
|
|
61
|
+
new(painter: WebGLRenderingContext, isElement?: boolean): this
|
|
62
|
+
}
|
|
63
|
+
interface NewTextureType extends TextureType {
|
|
64
|
+
new(painter: WebGLRenderingContext, type: string, unit?: number): this
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// 投影
|
|
68
|
+
interface NewEoapType extends MapType {
|
|
69
|
+
new(scale?: number, center?: number[]): this
|
|
70
|
+
}
|
|
71
|
+
interface NewMercatorType extends MapType {
|
|
72
|
+
new(scale?: number, center?: number[]): this
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// 布局
|
|
76
|
+
interface NewTreeLayoutType extends TreeLayoutType {
|
|
77
|
+
new(config?: TreeConfigType): this
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export default class VISLite {
|
|
81
|
+
|
|
82
|
+
// 插值
|
|
83
|
+
static Cardinal: NewCardinalType
|
|
84
|
+
static Hermite: NewHermiteType
|
|
85
|
+
|
|
86
|
+
// 变换
|
|
87
|
+
static Matrix4: NewMatrix4Type
|
|
88
|
+
static rotate: rotateType
|
|
89
|
+
static move: moveType
|
|
90
|
+
static scale: scaleType
|
|
91
|
+
|
|
92
|
+
// 工具
|
|
93
|
+
static getLoopColors: getLoopColorsType
|
|
94
|
+
static animation: animationType
|
|
95
|
+
static ruler: rulerType
|
|
96
|
+
|
|
97
|
+
// 画笔
|
|
98
|
+
static SVG: NewSVGType
|
|
99
|
+
static Canvas: NewCanvasType
|
|
100
|
+
|
|
101
|
+
// WebGL
|
|
102
|
+
static getWebGLContext: getWebGLContextType
|
|
103
|
+
static Shader: NewShaderType
|
|
104
|
+
static Buffer: NewBufferType
|
|
105
|
+
static Texture: NewTextureType
|
|
106
|
+
|
|
107
|
+
// 投影
|
|
108
|
+
static Eoap: NewEoapType
|
|
109
|
+
static Mercator: NewMercatorType
|
|
110
|
+
|
|
111
|
+
// 辅助
|
|
112
|
+
static throttle: throttleType
|
|
113
|
+
static assemble: assembleType
|
|
114
|
+
|
|
115
|
+
// 布局
|
|
116
|
+
static TreeLayout: NewTreeLayoutType
|
|
117
|
+
|
|
118
|
+
// 配置项
|
|
119
|
+
static initOption: initOptionType
|
|
120
|
+
static mergeOption: mergeOptionType
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// 插值
|
|
124
|
+
export let Cardinal: NewCardinalType
|
|
125
|
+
export let Hermite: NewHermiteType
|
|
126
|
+
|
|
127
|
+
// 变换
|
|
128
|
+
export let Matrix4: NewMatrix4Type
|
|
129
|
+
export let rotate: rotateType
|
|
130
|
+
export let move: moveType
|
|
131
|
+
export let scale: scaleType
|
|
132
|
+
|
|
133
|
+
// 工具
|
|
134
|
+
export let getLoopColors: getLoopColorsType
|
|
135
|
+
export let animation: animationType
|
|
136
|
+
export let ruler: rulerType
|
|
137
|
+
|
|
138
|
+
// 画笔
|
|
139
|
+
export let SVG: NewSVGType
|
|
140
|
+
export let Canvas: NewCanvasType
|
|
141
|
+
|
|
142
|
+
// WebGL
|
|
143
|
+
export let getWebGLContext: getWebGLContextType
|
|
144
|
+
export let Shader: NewShaderType
|
|
145
|
+
export let Buffer: NewBufferType
|
|
146
|
+
export let Texture: NewTextureType
|
|
147
|
+
|
|
148
|
+
// 投影
|
|
149
|
+
export let Eoap: NewEoapType
|
|
150
|
+
export let Mercator: NewMercatorType
|
|
151
|
+
|
|
152
|
+
// 辅助
|
|
153
|
+
export let throttle: throttleType
|
|
154
|
+
export let assemble: assembleType
|
|
155
|
+
|
|
156
|
+
// 布局
|
|
157
|
+
export let TreeLayout: NewTreeLayoutType
|
|
158
|
+
|
|
159
|
+
// 配置项
|
|
160
|
+
export let initOption: initOptionType
|
|
159
161
|
export let mergeOption: mergeOptionType
|