vislite 0.7.0 → 0.7.1
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 +11 -1
- package/README.md +135 -135
- package/lib/Buffer/index.umd.js +2 -2
- package/lib/Buffer/index.umd.min.js +2 -2
- package/lib/Canvas/index.umd.js +19 -13
- package/lib/Canvas/index.umd.min.js +3 -3
- package/lib/Cardinal/index.umd.js +2 -2
- package/lib/Cardinal/index.umd.min.js +2 -2
- package/lib/Eoap/index.umd.js +2 -2
- package/lib/Eoap/index.umd.min.js +2 -2
- package/lib/Geometry/index.umd.js +2 -2
- package/lib/Geometry/index.umd.min.js +2 -2
- package/lib/Hermite/index.umd.js +2 -2
- package/lib/Hermite/index.umd.min.js +2 -2
- package/lib/Matrix4/index.umd.js +2 -2
- package/lib/Matrix4/index.umd.min.js +2 -2
- package/lib/Mercator/index.umd.js +2 -2
- package/lib/Mercator/index.umd.min.js +2 -2
- package/lib/OralCanvas/index.es.js +11 -7
- package/lib/OralCanvas/index.es.min.js +3 -3
- package/lib/OralWebGL/index.es.js +2 -3
- package/lib/OralWebGL/index.es.min.js +3 -3
- package/lib/SVG/index.umd.js +2 -2
- package/lib/SVG/index.umd.min.js +2 -2
- package/lib/Shader/index.umd.js +2 -3
- package/lib/Shader/index.umd.min.js +3 -3
- package/lib/Texture/index.umd.js +2 -2
- package/lib/Texture/index.umd.min.js +2 -2
- package/lib/TreeLayout/index.umd.js +2 -2
- package/lib/TreeLayout/index.umd.min.js +2 -2
- package/lib/WebGL/index.umd.js +2 -3
- package/lib/WebGL/index.umd.min.js +3 -3
- package/lib/animation/index.umd.js +2 -2
- package/lib/animation/index.umd.min.js +2 -2
- package/lib/formatColor/index.umd.js +2 -2
- package/lib/formatColor/index.umd.min.js +2 -2
- package/lib/getLoopColors/index.umd.js +2 -2
- package/lib/getLoopColors/index.umd.min.js +2 -2
- package/lib/getWebGLContext/index.umd.js +2 -2
- package/lib/getWebGLContext/index.umd.min.js +2 -2
- package/lib/index.umd.js +19 -14
- package/lib/index.umd.min.js +3 -3
- package/lib/move/index.umd.js +2 -2
- package/lib/move/index.umd.min.js +2 -2
- package/lib/resizeObserver/index.umd.js +2 -2
- package/lib/resizeObserver/index.umd.min.js +2 -2
- package/lib/rotate/index.umd.js +2 -2
- package/lib/rotate/index.umd.min.js +2 -2
- package/lib/ruler/index.umd.js +2 -2
- package/lib/ruler/index.umd.min.js +2 -2
- package/lib/scale/index.umd.js +2 -2
- package/lib/scale/index.umd.min.js +2 -2
- package/lib/throttle/index.umd.js +2 -2
- package/lib/throttle/index.umd.min.js +2 -2
- package/lib/viewHandler/index.umd.js +2 -2
- package/lib/viewHandler/index.umd.min.js +2 -2
- package/package.json +1 -1
- package/src/Canvas.ts +8 -6
- package/src/Geometry.ts +0 -1
- package/src/Matrix4/rotate.ts +15 -15
- package/src/Matrix4/transform.ts +64 -64
- package/src/WebGL.ts +66 -66
- package/src/common/assemble.ts +22 -22
- package/src/common/canvas/index.ts +10 -4
- package/src/common/canvas/painter.ts +1 -1
- package/src/common/geometry/prism-vertical.ts +40 -40
- package/src/common/geometry/tool/rotateLine.ts +35 -35
- package/src/common/setStyle.ts +5 -5
- package/src/common/svg/config.ts +190 -190
- package/src/common/svg/index.ts +356 -356
- package/src/common/svg/tool.ts +44 -44
- package/src/common/tree/toInnerTree.ts +59 -59
- package/src/common/tree/toPlainTree.ts +132 -132
- package/src/common/webgl/buffer.ts +79 -79
- package/src/common/webgl/doDraw.ts +108 -108
- package/src/common/webgl/getWebGLContext.ts +28 -28
- package/src/common/webgl/index.ts +226 -226
- package/src/common/webgl/shader.ts +1 -1
- package/src/common/webgl/texture.ts +97 -97
- package/src/layout/TreeLayout.ts +188 -188
- package/src/resizeObserver.ts +37 -37
- package/src/ruler.ts +209 -209
- package/src/viewHandler.ts +160 -160
- package/types/Canvas.d.ts +308 -308
- package/types/Geometry.d.ts +65 -65
- package/types/Object3D.d.ts +114 -114
- package/types/SVGConfig.d.ts +79 -79
- package/types/Shader.d.ts +23 -21
- package/types/TreeConfig.d.ts +36 -36
- package/uni-app/ui-canvas.vue +53 -9
package/types/Geometry.d.ts
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
import GeometryResultType from './GeometryResult'
|
|
2
|
-
import GeometryOptionType from './GeometryOption'
|
|
3
|
-
|
|
4
|
-
export default interface GeometryType {
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* 配置对象
|
|
8
|
-
*/
|
|
9
|
-
config(option: GeometryOptionType): this
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* 圆柱体
|
|
13
|
-
* @param x
|
|
14
|
-
* @param y
|
|
15
|
-
* @param z
|
|
16
|
-
* @param radius
|
|
17
|
-
* @param height
|
|
18
|
-
*/
|
|
19
|
-
cylinder(x: number, y: number, z: number, radius: number, height: number): Array<GeometryResultType>
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* 圆柱体
|
|
23
|
-
* @param x
|
|
24
|
-
* @param y
|
|
25
|
-
* @param z
|
|
26
|
-
* @param radius
|
|
27
|
-
* @param x2
|
|
28
|
-
* @param y2
|
|
29
|
-
* @param z2
|
|
30
|
-
*/
|
|
31
|
-
cylinder(x: number, y: number, z: number, radius: number, x2: number, y2: number, z2: number): Array<GeometryResultType>
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* 棱柱体
|
|
35
|
-
* @param x
|
|
36
|
-
* @param y
|
|
37
|
-
* @param z
|
|
38
|
-
* @param radius
|
|
39
|
-
* @param height
|
|
40
|
-
* @param num
|
|
41
|
-
*/
|
|
42
|
-
prism(x: number, y: number, z: number, radius: number, height: number, num: number): Array<GeometryResultType>
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* 棱柱体
|
|
46
|
-
* @param x
|
|
47
|
-
* @param y
|
|
48
|
-
* @param z
|
|
49
|
-
* @param radius
|
|
50
|
-
* @param x2
|
|
51
|
-
* @param y2
|
|
52
|
-
* @param z2
|
|
53
|
-
* @param num
|
|
54
|
-
*/
|
|
55
|
-
prism(x: number, y: number, z: number, radius: number, x2: number, y2: number, z2: number, num: number): Array<GeometryResultType>
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* 球体
|
|
59
|
-
* @param cx
|
|
60
|
-
* @param cy
|
|
61
|
-
* @param cz
|
|
62
|
-
* @param radius
|
|
63
|
-
*/
|
|
64
|
-
sphere(cx: number, cy: number, cz: number, radius: number): Array<GeometryResultType>
|
|
65
|
-
|
|
1
|
+
import GeometryResultType from './GeometryResult'
|
|
2
|
+
import GeometryOptionType from './GeometryOption'
|
|
3
|
+
|
|
4
|
+
export default interface GeometryType {
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* 配置对象
|
|
8
|
+
*/
|
|
9
|
+
config(option: GeometryOptionType): this
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 圆柱体
|
|
13
|
+
* @param x
|
|
14
|
+
* @param y
|
|
15
|
+
* @param z
|
|
16
|
+
* @param radius
|
|
17
|
+
* @param height
|
|
18
|
+
*/
|
|
19
|
+
cylinder(x: number, y: number, z: number, radius: number, height: number): Array<GeometryResultType>
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 圆柱体
|
|
23
|
+
* @param x
|
|
24
|
+
* @param y
|
|
25
|
+
* @param z
|
|
26
|
+
* @param radius
|
|
27
|
+
* @param x2
|
|
28
|
+
* @param y2
|
|
29
|
+
* @param z2
|
|
30
|
+
*/
|
|
31
|
+
cylinder(x: number, y: number, z: number, radius: number, x2: number, y2: number, z2: number): Array<GeometryResultType>
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 棱柱体
|
|
35
|
+
* @param x
|
|
36
|
+
* @param y
|
|
37
|
+
* @param z
|
|
38
|
+
* @param radius
|
|
39
|
+
* @param height
|
|
40
|
+
* @param num
|
|
41
|
+
*/
|
|
42
|
+
prism(x: number, y: number, z: number, radius: number, height: number, num: number): Array<GeometryResultType>
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* 棱柱体
|
|
46
|
+
* @param x
|
|
47
|
+
* @param y
|
|
48
|
+
* @param z
|
|
49
|
+
* @param radius
|
|
50
|
+
* @param x2
|
|
51
|
+
* @param y2
|
|
52
|
+
* @param z2
|
|
53
|
+
* @param num
|
|
54
|
+
*/
|
|
55
|
+
prism(x: number, y: number, z: number, radius: number, x2: number, y2: number, z2: number, num: number): Array<GeometryResultType>
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 球体
|
|
59
|
+
* @param cx
|
|
60
|
+
* @param cy
|
|
61
|
+
* @param cz
|
|
62
|
+
* @param radius
|
|
63
|
+
*/
|
|
64
|
+
sphere(cx: number, cy: number, cz: number, radius: number): Array<GeometryResultType>
|
|
65
|
+
|
|
66
66
|
}
|
package/types/Object3D.d.ts
CHANGED
|
@@ -1,115 +1,115 @@
|
|
|
1
|
-
import Matrix4Type from './Matrix4'
|
|
2
|
-
|
|
3
|
-
export type geometryType = "LINES" | "
|
|
4
|
-
|
|
5
|
-
export interface meshType {
|
|
6
|
-
|
|
7
|
-
// 形状
|
|
8
|
-
geometry: {
|
|
9
|
-
attributes: {
|
|
10
|
-
|
|
11
|
-
// 点坐标
|
|
12
|
-
position: {
|
|
13
|
-
array: number[] | Float32Array
|
|
14
|
-
count: number
|
|
15
|
-
itemSize: number
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// 法向量
|
|
19
|
-
normal?: {
|
|
20
|
-
array: number[] | Float32Array
|
|
21
|
-
count: number
|
|
22
|
-
itemSize: number
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// 纹理坐标
|
|
26
|
-
uv?: {
|
|
27
|
-
array: number[] | Float32Array
|
|
28
|
-
count: number
|
|
29
|
-
itemSize: number
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// 索引
|
|
35
|
-
index?: {
|
|
36
|
-
array: number[] | Uint8Array
|
|
37
|
-
count: number
|
|
38
|
-
itemSize: number
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// 线、还是三角形
|
|
42
|
-
type: geometryType
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// 材质
|
|
46
|
-
material: {
|
|
47
|
-
|
|
48
|
-
// 单一的颜色
|
|
49
|
-
color?: {
|
|
50
|
-
r: number
|
|
51
|
-
g: number
|
|
52
|
-
b: number
|
|
53
|
-
alpha: number
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// 多颜色
|
|
57
|
-
colors?: {
|
|
58
|
-
array: number[] | Float32Array
|
|
59
|
-
count: number
|
|
60
|
-
itemSize: number
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// 立方体纹理
|
|
64
|
-
cube?: {
|
|
65
|
-
left?: {
|
|
66
|
-
image: {
|
|
67
|
-
value?: TexImageSource
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
right?: {
|
|
71
|
-
image: {
|
|
72
|
-
value?: TexImageSource
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
near?: {
|
|
76
|
-
image: {
|
|
77
|
-
value?: TexImageSource
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
far?: {
|
|
81
|
-
image: {
|
|
82
|
-
value?: TexImageSource
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
top?: {
|
|
86
|
-
image: {
|
|
87
|
-
value?: TexImageSource
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
bottom?: {
|
|
91
|
-
image: {
|
|
92
|
-
value?: TexImageSource
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// 二维纹理
|
|
98
|
-
image?: {
|
|
99
|
-
value?: TexImageSource
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export default interface Object3D {
|
|
106
|
-
|
|
107
|
-
// 区域名称,不设置或设置为空字符串,表示此区域无需记录
|
|
108
|
-
region?: string
|
|
109
|
-
|
|
110
|
-
// 变换矩阵
|
|
111
|
-
matrix?: Matrix4Type
|
|
112
|
-
|
|
113
|
-
// 图形
|
|
114
|
-
mesh: meshType[]
|
|
1
|
+
import Matrix4Type from './Matrix4'
|
|
2
|
+
|
|
3
|
+
export type geometryType = "LINES" | "LINE_STRIP" | "LINE_LOOP" | "TRIANGLES" | "TRIANGLE_STRIP" | "TRIANGLE_FAN"
|
|
4
|
+
|
|
5
|
+
export interface meshType {
|
|
6
|
+
|
|
7
|
+
// 形状
|
|
8
|
+
geometry: {
|
|
9
|
+
attributes: {
|
|
10
|
+
|
|
11
|
+
// 点坐标
|
|
12
|
+
position: {
|
|
13
|
+
array: number[] | Float32Array
|
|
14
|
+
count: number
|
|
15
|
+
itemSize: number
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// 法向量
|
|
19
|
+
normal?: {
|
|
20
|
+
array: number[] | Float32Array
|
|
21
|
+
count: number
|
|
22
|
+
itemSize: number
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// 纹理坐标
|
|
26
|
+
uv?: {
|
|
27
|
+
array: number[] | Float32Array
|
|
28
|
+
count: number
|
|
29
|
+
itemSize: number
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// 索引
|
|
35
|
+
index?: {
|
|
36
|
+
array: number[] | Uint8Array
|
|
37
|
+
count: number
|
|
38
|
+
itemSize: number
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// 线、还是三角形
|
|
42
|
+
type: geometryType
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// 材质
|
|
46
|
+
material: {
|
|
47
|
+
|
|
48
|
+
// 单一的颜色
|
|
49
|
+
color?: {
|
|
50
|
+
r: number
|
|
51
|
+
g: number
|
|
52
|
+
b: number
|
|
53
|
+
alpha: number
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// 多颜色
|
|
57
|
+
colors?: {
|
|
58
|
+
array: number[] | Float32Array
|
|
59
|
+
count: number
|
|
60
|
+
itemSize: number
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// 立方体纹理
|
|
64
|
+
cube?: {
|
|
65
|
+
left?: {
|
|
66
|
+
image: {
|
|
67
|
+
value?: TexImageSource
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
right?: {
|
|
71
|
+
image: {
|
|
72
|
+
value?: TexImageSource
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
near?: {
|
|
76
|
+
image: {
|
|
77
|
+
value?: TexImageSource
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
far?: {
|
|
81
|
+
image: {
|
|
82
|
+
value?: TexImageSource
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
top?: {
|
|
86
|
+
image: {
|
|
87
|
+
value?: TexImageSource
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
bottom?: {
|
|
91
|
+
image: {
|
|
92
|
+
value?: TexImageSource
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// 二维纹理
|
|
98
|
+
image?: {
|
|
99
|
+
value?: TexImageSource
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export default interface Object3D {
|
|
106
|
+
|
|
107
|
+
// 区域名称,不设置或设置为空字符串,表示此区域无需记录
|
|
108
|
+
region?: string
|
|
109
|
+
|
|
110
|
+
// 变换矩阵
|
|
111
|
+
matrix?: Matrix4Type
|
|
112
|
+
|
|
113
|
+
// 图形
|
|
114
|
+
mesh: meshType[]
|
|
115
115
|
}
|
package/types/SVGConfig.d.ts
CHANGED
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
import { arcCapType, textAlignType, textBaselineType } 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
|
-
* 文字水平对齐方式,默认"left"左对齐(还有"center"居中和"right"右对齐)
|
|
25
|
-
*/
|
|
26
|
-
textAlign?: textAlignType
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* 文字垂直对齐方式,默认"middle"垂直居中(还有"top"上对齐和"bottom"下对齐)
|
|
30
|
-
*/
|
|
31
|
-
textBaseline?: textBaselineType
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* 设置线条虚线,默认为[]表示使用实线绘制
|
|
35
|
-
*
|
|
36
|
-
* 值应该是一个数组,格式:[实线长,虚线长,实线长 ...],数组长度任意,会自动循环
|
|
37
|
-
*/
|
|
38
|
-
lineDash?: Array<number>
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* 文字大小,默认16
|
|
42
|
-
*/
|
|
43
|
-
"fontSize"?: number
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* 已废弃,向下兼容,请用 fontSize 代替
|
|
47
|
-
*/
|
|
48
|
-
"font-size"?: number // 向下兼容
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* 字体,默认"sans-serif"
|
|
52
|
-
*/
|
|
53
|
-
"fontFamily"?: string
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* 已废弃,向下兼容,请用 fontFamily 代替
|
|
57
|
-
*/
|
|
58
|
-
"font-family"?: string // 向下兼容
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* 圆弧开始端闭合方式,默认"butt"直线闭合(还有"round"圆帽闭合,"-round"反圆帽闭合)
|
|
62
|
-
*/
|
|
63
|
-
"arcStartCap"?: arcCapType
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* 已废弃,向下兼容,请用 arcStartCap 代替
|
|
67
|
-
*/
|
|
68
|
-
"arc-start-cap"?: string // 向下兼容
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* 圆弧结束端闭合方式,默认"butt"直线闭合(还有"round"圆帽闭合,"-round"反圆帽闭合)
|
|
72
|
-
*/
|
|
73
|
-
"arcEndCap"?: arcCapType
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* 已废弃,向下兼容,请用 arcEndCap 代替
|
|
77
|
-
*/
|
|
78
|
-
"arc-end-cap"?: string // 向下兼容
|
|
79
|
-
|
|
1
|
+
import { arcCapType, textAlignType, textBaselineType } 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
|
+
* 文字水平对齐方式,默认"left"左对齐(还有"center"居中和"right"右对齐)
|
|
25
|
+
*/
|
|
26
|
+
textAlign?: textAlignType
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 文字垂直对齐方式,默认"middle"垂直居中(还有"top"上对齐和"bottom"下对齐)
|
|
30
|
+
*/
|
|
31
|
+
textBaseline?: textBaselineType
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 设置线条虚线,默认为[]表示使用实线绘制
|
|
35
|
+
*
|
|
36
|
+
* 值应该是一个数组,格式:[实线长,虚线长,实线长 ...],数组长度任意,会自动循环
|
|
37
|
+
*/
|
|
38
|
+
lineDash?: Array<number>
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* 文字大小,默认16
|
|
42
|
+
*/
|
|
43
|
+
"fontSize"?: number
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* 已废弃,向下兼容,请用 fontSize 代替
|
|
47
|
+
*/
|
|
48
|
+
"font-size"?: number // 向下兼容
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 字体,默认"sans-serif"
|
|
52
|
+
*/
|
|
53
|
+
"fontFamily"?: string
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 已废弃,向下兼容,请用 fontFamily 代替
|
|
57
|
+
*/
|
|
58
|
+
"font-family"?: string // 向下兼容
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* 圆弧开始端闭合方式,默认"butt"直线闭合(还有"round"圆帽闭合,"-round"反圆帽闭合)
|
|
62
|
+
*/
|
|
63
|
+
"arcStartCap"?: arcCapType
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* 已废弃,向下兼容,请用 arcStartCap 代替
|
|
67
|
+
*/
|
|
68
|
+
"arc-start-cap"?: string // 向下兼容
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* 圆弧结束端闭合方式,默认"butt"直线闭合(还有"round"圆帽闭合,"-round"反圆帽闭合)
|
|
72
|
+
*/
|
|
73
|
+
"arcEndCap"?: arcCapType
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* 已废弃,向下兼容,请用 arcEndCap 代替
|
|
77
|
+
*/
|
|
78
|
+
"arc-end-cap"?: string // 向下兼容
|
|
79
|
+
|
|
80
80
|
}
|
package/types/Shader.d.ts
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
export default interface ShaderType {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
export default interface ShaderType {
|
|
2
|
+
|
|
3
|
+
program: WebGLProgram
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 使用这个程序
|
|
7
|
+
* (后于编译)
|
|
8
|
+
*/
|
|
9
|
+
use(): this
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 编译着色器程序
|
|
13
|
+
* @param vshaderSource 顶点着色器
|
|
14
|
+
* @param fshaderSource 片段(元)着色器
|
|
15
|
+
*/
|
|
16
|
+
compile(vshaderSource: string, fshaderSource: string): this
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* 编译内置定义好的着色器程序
|
|
20
|
+
* @param shaderName 着色器名称,可选值有:color、colors、image、cube
|
|
21
|
+
*/
|
|
22
|
+
compile(shaderName: string): this
|
|
23
|
+
|
|
22
24
|
}
|
package/types/TreeConfig.d.ts
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
export interface rootType {
|
|
2
|
-
(initTree: any): any
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
export interface childrenType {
|
|
6
|
-
(parentTree: any, initTree: any): any[]
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface idType {
|
|
10
|
-
(treedata: any): string
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export default interface TreeConfigType {
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* 获取根结点的方法
|
|
17
|
-
* @param initTree 原始数据
|
|
18
|
-
* @returns 返回根结点
|
|
19
|
-
*/
|
|
20
|
-
root?: rootType
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* 获取子结点的方法
|
|
24
|
-
* @param parentTree 父结点
|
|
25
|
-
* @param initTree 原始数据
|
|
26
|
-
* @returns 返回当前父结点的所有子结点数组
|
|
27
|
-
*/
|
|
28
|
-
children?: childrenType
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* 获取结点ID方法
|
|
32
|
-
* @param treedata 当前结点
|
|
33
|
-
* @returns 返回可以唯一标识当前结点的id
|
|
34
|
-
*/
|
|
35
|
-
id?: idType
|
|
36
|
-
|
|
1
|
+
export interface rootType {
|
|
2
|
+
(initTree: any): any
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export interface childrenType {
|
|
6
|
+
(parentTree: any, initTree: any): any[]
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface idType {
|
|
10
|
+
(treedata: any): string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default interface TreeConfigType {
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 获取根结点的方法
|
|
17
|
+
* @param initTree 原始数据
|
|
18
|
+
* @returns 返回根结点
|
|
19
|
+
*/
|
|
20
|
+
root?: rootType
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 获取子结点的方法
|
|
24
|
+
* @param parentTree 父结点
|
|
25
|
+
* @param initTree 原始数据
|
|
26
|
+
* @returns 返回当前父结点的所有子结点数组
|
|
27
|
+
*/
|
|
28
|
+
children?: childrenType
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* 获取结点ID方法
|
|
32
|
+
* @param treedata 当前结点
|
|
33
|
+
* @returns 返回可以唯一标识当前结点的id
|
|
34
|
+
*/
|
|
35
|
+
id?: idType
|
|
36
|
+
|
|
37
37
|
}
|