vislite 0.5.0 → 0.5.2-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.
- package/.editorconfig +18 -18
- package/AUTHORS.txt +6 -6
- package/CHANGELOG +5 -0
- package/LICENSE +20 -20
- package/README.md +69 -69
- package/miniprogram/ui-canvas/index.js +107 -107
- package/miniprogram/ui-canvas/index.json +4 -4
- package/miniprogram/ui-canvas/index.wxml +4 -4
- package/miniprogram/ui-canvas/index.wxss +5 -5
- package/package/Buffer/index.ts +2 -2
- package/package/Canvas/index.ts +2 -2
- package/package/Cardinal/index.ts +2 -2
- package/package/Eoap/index.ts +2 -2
- package/package/Hermite/index.ts +2 -2
- package/package/Matrix4/index.ts +2 -2
- package/package/Mercator/index.ts +2 -2
- package/package/OralCanvas/index.ts +2 -2
- package/package/OralWebGL/index.ts +2 -2
- package/package/SVG/index.ts +2 -2
- package/package/Shader/index.ts +39 -39
- package/package/Texture/index.ts +2 -2
- package/package/TreeLayout/index.ts +2 -2
- package/package/WebGL/index.ts +2 -2
- package/package/animation/index.ts +2 -2
- package/package/formatColor/index.ts +2 -2
- package/package/getLoopColors/index.ts +2 -2
- package/package/getWebGLContext/index.ts +39 -39
- package/package/resizeObserver/index.ts +2 -2
- package/package/rotate/index.ts +2 -2
- package/package/ruler/index.ts +2 -2
- package/package/throttle/index.ts +2 -2
- package/package/viewHandler/index.ts +2 -2
- package/package.json +1 -1
- package/src/Canvas.ts +67 -67
- package/src/Matrix4/move.ts +12 -12
- package/src/Matrix4/rotate.ts +15 -15
- package/src/Matrix4/scale.ts +11 -11
- package/src/Matrix4/transform.ts +64 -64
- package/src/SVG.ts +24 -24
- package/src/WebGL.ts +66 -66
- package/src/animation.ts +98 -98
- package/src/common/assemble.ts +22 -22
- package/src/common/canvas/arc.ts +50 -50
- package/src/common/canvas/config.ts +158 -158
- package/src/common/canvas/gradient.ts +29 -29
- package/src/common/canvas/index.ts +168 -168
- package/src/common/canvas/painter.ts +426 -426
- package/src/common/canvas/texts.ts +18 -18
- package/src/common/mergeOption.ts +6 -6
- package/src/common/setStyle.ts +5 -5
- package/src/common/svg/config.ts +174 -174
- package/src/common/svg/tool.ts +44 -44
- package/src/common/tree/index.ts +25 -25
- package/src/common/tree/toInnerTree.ts +56 -56
- package/src/common/tree/toPlainTree.ts +131 -131
- package/src/common/webgl/buffer.ts +79 -79
- package/src/common/webgl/doDraw.ts +108 -108
- package/src/common/webgl/getColorFactory.ts +26 -26
- package/src/common/webgl/getShader.ts +48 -48
- package/src/common/webgl/getTexture.ts +11 -11
- package/src/common/webgl/getWebGLContext.ts +27 -27
- package/src/common/webgl/index.ts +223 -223
- package/src/common/webgl/shader.ts +75 -75
- package/src/common/webgl/texture.ts +96 -96
- package/src/formatColor.ts +44 -44
- package/src/getLoopColors.ts +42 -42
- package/src/interpolation/Cardinal.ts +110 -110
- package/src/interpolation/Hermite.ts +65 -65
- package/src/resizeObserver.ts +36 -36
- package/src/ruler.ts +188 -188
- package/src/shader/fsColor.c +7 -7
- package/src/shader/fsColors.c +7 -7
- package/src/shader/fsCube.c +8 -8
- package/src/shader/fsImage.c +8 -8
- package/src/shader/vsColor.c +17 -17
- package/src/shader/vsColors.c +13 -13
- package/src/shader/vsCube.c +13 -13
- package/src/shader/vsImage.c +13 -13
- package/src/throttle.ts +51 -51
- package/src/viewHandler.ts +158 -158
- package/types/Buffer.d.ts +23 -23
- package/types/Canvas.d.ts +300 -300
- package/types/CanvasOption.d.ts +7 -7
- package/types/Cardinal.d.ts +13 -13
- package/types/Gradient.d.ts +14 -14
- package/types/Hermite.d.ts +18 -18
- package/types/Object3D.d.ts +114 -114
- package/types/SVGConfig.d.ts +76 -76
- package/types/Scene3D.d.ts +6 -6
- package/types/Shader.d.ts +21 -21
- package/types/Texture.d.ts +16 -16
- package/types/Tree.d.ts +69 -69
- package/types/TreeConfig.d.ts +24 -24
- package/types/TreeOption.d.ts +48 -48
- package/types/WebGL.d.ts +38 -38
- package/types/WebGLOption.d.ts +7 -7
- package/types/animation.d.ts +6 -6
- package/types/formatColor.d.ts +2 -2
- package/types/getLoopColors.d.ts +2 -2
- package/types/getWebGLContext.d.ts +2 -2
- package/types/painterConfig.d.ts +2 -2
- package/types/resizeObserver.d.ts +2 -2
- package/types/ruler.d.ts +7 -7
- package/types/throttle.d.ts +4 -4
- package/types/throttleOption.d.ts +21 -21
- package/types/viewHandler.d.ts +13 -13
- package/uni-app/ui-canvas.vue +226 -222
- package/lib/Buffer/index.umd.js +0 -55
- package/lib/Buffer/index.umd.min.js +0 -11
- package/lib/Canvas/index.umd.js +0 -721
- package/lib/Canvas/index.umd.min.js +0 -11
- package/lib/Cardinal/index.umd.js +0 -112
- package/lib/Cardinal/index.umd.min.js +0 -11
- package/lib/Eoap/index.umd.js +0 -53
- package/lib/Eoap/index.umd.min.js +0 -11
- package/lib/Geometry/index.umd.js +0 -205
- package/lib/Geometry/index.umd.min.js +0 -11
- package/lib/Hermite/index.umd.js +0 -55
- package/lib/Hermite/index.umd.min.js +0 -11
- package/lib/Matrix4/index.umd.js +0 -146
- package/lib/Matrix4/index.umd.min.js +0 -11
- package/lib/Mercator/index.umd.js +0 -39
- package/lib/Mercator/index.umd.min.js +0 -11
- package/lib/OralCanvas/index.es.js +0 -657
- package/lib/OralCanvas/index.es.min.js +0 -11
- package/lib/OralWebGL/index.es.js +0 -611
- package/lib/OralWebGL/index.es.min.js +0 -11
- package/lib/SVG/index.umd.js +0 -475
- package/lib/SVG/index.umd.min.js +0 -11
- package/lib/Shader/index.umd.js +0 -134
- package/lib/Shader/index.umd.min.js +0 -11
- package/lib/Texture/index.umd.js +0 -72
- package/lib/Texture/index.umd.min.js +0 -11
- package/lib/TreeLayout/index.umd.js +0 -430
- package/lib/TreeLayout/index.umd.min.js +0 -11
- package/lib/WebGL/index.umd.js +0 -684
- package/lib/WebGL/index.umd.min.js +0 -11
- package/lib/animation/index.umd.js +0 -91
- package/lib/animation/index.umd.min.js +0 -11
- package/lib/formatColor/index.umd.js +0 -59
- package/lib/formatColor/index.umd.min.js +0 -11
- package/lib/getLoopColors/index.umd.js +0 -55
- package/lib/getLoopColors/index.umd.min.js +0 -11
- package/lib/getWebGLContext/index.umd.js +0 -65
- package/lib/getWebGLContext/index.umd.min.js +0 -11
- package/lib/index.umd.js +0 -2834
- package/lib/index.umd.min.js +0 -11
- package/lib/resizeObserver/index.umd.js +0 -48
- package/lib/resizeObserver/index.umd.min.js +0 -11
- package/lib/rotate/index.umd.js +0 -27
- package/lib/rotate/index.umd.min.js +0 -11
- package/lib/ruler/index.umd.js +0 -145
- package/lib/ruler/index.umd.min.js +0 -11
- package/lib/throttle/index.umd.js +0 -70
- package/lib/throttle/index.umd.min.js +0 -11
- package/lib/viewHandler/index.umd.js +0 -139
- package/lib/viewHandler/index.umd.min.js +0 -11
package/types/Hermite.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export default interface HermiteType {
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* 设置点的位置和斜率:
|
|
5
|
-
* @param x1 左边点的位置
|
|
6
|
-
* @param y1
|
|
7
|
-
* @param x2 右边点的位置
|
|
8
|
-
* @param y2
|
|
9
|
-
* @param s1 两个点的斜率
|
|
10
|
-
* @param s2
|
|
11
|
-
*/
|
|
12
|
-
setP(x1: number, y1: number, x2: number, y2: number, s1: number, s2: number): this
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* 根据x值返回y值:
|
|
16
|
-
*/
|
|
17
|
-
use(x: number): number
|
|
18
|
-
|
|
1
|
+
export default interface HermiteType {
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 设置点的位置和斜率:
|
|
5
|
+
* @param x1 左边点的位置
|
|
6
|
+
* @param y1
|
|
7
|
+
* @param x2 右边点的位置
|
|
8
|
+
* @param y2
|
|
9
|
+
* @param s1 两个点的斜率
|
|
10
|
+
* @param s2
|
|
11
|
+
*/
|
|
12
|
+
setP(x1: number, y1: number, x2: number, y2: number, s1: number, s2: number): this
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 根据x值返回y值:
|
|
16
|
+
*/
|
|
17
|
+
use(x: number): number
|
|
18
|
+
|
|
19
19
|
}
|
package/types/Object3D.d.ts
CHANGED
|
@@ -1,115 +1,115 @@
|
|
|
1
|
-
import Matrix4Type from './Matrix4'
|
|
2
|
-
|
|
3
|
-
export type geometryType = "LINES" | "INE_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[]
|
|
1
|
+
import Matrix4Type from './Matrix4'
|
|
2
|
+
|
|
3
|
+
export type geometryType = "LINES" | "INE_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,77 +1,77 @@
|
|
|
1
|
-
import { arcCapType, textAlignType, textBaselineType } from './painterConfig'
|
|
2
|
-
|
|
3
|
-
export default interface SVGConfigType {
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* 填充色或图案,默认"#000"
|
|
7
|
-
*/
|
|
8
|
-
fillStyle?: string
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* 轮廓色或图案,默认"#000"
|
|
12
|
-
*/
|
|
13
|
-
strokeStyle?: string
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* 线条宽度,默认1(单位px)
|
|
17
|
-
*/
|
|
18
|
-
lineWidth?: number
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* 文字水平对齐方式,默认"left"左对齐(还有"center"居中和"right"右对齐)
|
|
22
|
-
*/
|
|
23
|
-
textAlign?: textAlignType
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* 文字垂直对齐方式,默认"middle"垂直居中(还有"top"上对齐和"bottom"下对齐)
|
|
27
|
-
*/
|
|
28
|
-
textBaseline?: textBaselineType
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* 设置线条虚线,默认为[]表示使用实线绘制
|
|
32
|
-
*
|
|
33
|
-
* 值应该是一个数组,格式:[实线长,虚线长,实线长 ...],数组长度任意,会自动循环
|
|
34
|
-
*/
|
|
35
|
-
lineDash?: Array<number>
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* 文字大小,默认16
|
|
39
|
-
*/
|
|
40
|
-
"fontSize"?: number
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* 已废弃,向下兼容,请用 fontSize 代替
|
|
44
|
-
*/
|
|
45
|
-
"font-size"?: number // 向下兼容
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* 字体,默认"sans-serif"
|
|
49
|
-
*/
|
|
50
|
-
"fontFamily"?: string
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* 已废弃,向下兼容,请用 fontFamily 代替
|
|
54
|
-
*/
|
|
55
|
-
"font-family"?: string // 向下兼容
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* 圆弧开始端闭合方式,默认"butt"直线闭合(还有"round"圆帽闭合,"-round"反圆帽闭合)
|
|
59
|
-
*/
|
|
60
|
-
"arcStartCap"?: arcCapType
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* 已废弃,向下兼容,请用 arcStartCap 代替
|
|
64
|
-
*/
|
|
65
|
-
"arc-start-cap"?: string // 向下兼容
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* 圆弧结束端闭合方式,默认"butt"直线闭合(还有"round"圆帽闭合,"-round"反圆帽闭合)
|
|
69
|
-
*/
|
|
70
|
-
"arcEndCap"?: arcCapType
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* 已废弃,向下兼容,请用 arcEndCap 代替
|
|
74
|
-
*/
|
|
75
|
-
"arc-end-cap"?: string // 向下兼容
|
|
76
|
-
|
|
1
|
+
import { arcCapType, textAlignType, textBaselineType } from './painterConfig'
|
|
2
|
+
|
|
3
|
+
export default interface SVGConfigType {
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 填充色或图案,默认"#000"
|
|
7
|
+
*/
|
|
8
|
+
fillStyle?: string
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 轮廓色或图案,默认"#000"
|
|
12
|
+
*/
|
|
13
|
+
strokeStyle?: string
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 线条宽度,默认1(单位px)
|
|
17
|
+
*/
|
|
18
|
+
lineWidth?: number
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* 文字水平对齐方式,默认"left"左对齐(还有"center"居中和"right"右对齐)
|
|
22
|
+
*/
|
|
23
|
+
textAlign?: textAlignType
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 文字垂直对齐方式,默认"middle"垂直居中(还有"top"上对齐和"bottom"下对齐)
|
|
27
|
+
*/
|
|
28
|
+
textBaseline?: textBaselineType
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* 设置线条虚线,默认为[]表示使用实线绘制
|
|
32
|
+
*
|
|
33
|
+
* 值应该是一个数组,格式:[实线长,虚线长,实线长 ...],数组长度任意,会自动循环
|
|
34
|
+
*/
|
|
35
|
+
lineDash?: Array<number>
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* 文字大小,默认16
|
|
39
|
+
*/
|
|
40
|
+
"fontSize"?: number
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* 已废弃,向下兼容,请用 fontSize 代替
|
|
44
|
+
*/
|
|
45
|
+
"font-size"?: number // 向下兼容
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 字体,默认"sans-serif"
|
|
49
|
+
*/
|
|
50
|
+
"fontFamily"?: string
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* 已废弃,向下兼容,请用 fontFamily 代替
|
|
54
|
+
*/
|
|
55
|
+
"font-family"?: string // 向下兼容
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 圆弧开始端闭合方式,默认"butt"直线闭合(还有"round"圆帽闭合,"-round"反圆帽闭合)
|
|
59
|
+
*/
|
|
60
|
+
"arcStartCap"?: arcCapType
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* 已废弃,向下兼容,请用 arcStartCap 代替
|
|
64
|
+
*/
|
|
65
|
+
"arc-start-cap"?: string // 向下兼容
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* 圆弧结束端闭合方式,默认"butt"直线闭合(还有"round"圆帽闭合,"-round"反圆帽闭合)
|
|
69
|
+
*/
|
|
70
|
+
"arcEndCap"?: arcCapType
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* 已废弃,向下兼容,请用 arcEndCap 代替
|
|
74
|
+
*/
|
|
75
|
+
"arc-end-cap"?: string // 向下兼容
|
|
76
|
+
|
|
77
77
|
}
|
package/types/Scene3D.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import Object3D from './Object3D'
|
|
2
|
-
import Matrix4Type from './Matrix4'
|
|
3
|
-
|
|
4
|
-
export default interface Scene3D {
|
|
5
|
-
children: Object3D[]
|
|
6
|
-
matrix: Matrix4Type
|
|
1
|
+
import Object3D from './Object3D'
|
|
2
|
+
import Matrix4Type from './Matrix4'
|
|
3
|
+
|
|
4
|
+
export default interface Scene3D {
|
|
5
|
+
children: Object3D[]
|
|
6
|
+
matrix: Matrix4Type
|
|
7
7
|
}
|
package/types/Shader.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
export default interface ShaderType {
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* 使用这个程序
|
|
5
|
-
* (后于编译)
|
|
6
|
-
*/
|
|
7
|
-
use(): this
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* 编译着色器程序
|
|
11
|
-
* @param vshaderSource 顶点着色器
|
|
12
|
-
* @param fshaderSource 片段(元)着色器
|
|
13
|
-
*/
|
|
14
|
-
compile(vshaderSource: string, fshaderSource: string): this
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* 编译内置定义好的着色器程序
|
|
18
|
-
* @param shaderName 着色器名称,可选值有:color、colors、image、cube
|
|
19
|
-
*/
|
|
20
|
-
compile(shaderName: string): this
|
|
21
|
-
|
|
1
|
+
export default interface ShaderType {
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 使用这个程序
|
|
5
|
+
* (后于编译)
|
|
6
|
+
*/
|
|
7
|
+
use(): this
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 编译着色器程序
|
|
11
|
+
* @param vshaderSource 顶点着色器
|
|
12
|
+
* @param fshaderSource 片段(元)着色器
|
|
13
|
+
*/
|
|
14
|
+
compile(vshaderSource: string, fshaderSource: string): this
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 编译内置定义好的着色器程序
|
|
18
|
+
* @param shaderName 着色器名称,可选值有:color、colors、image、cube
|
|
19
|
+
*/
|
|
20
|
+
compile(shaderName: string): this
|
|
21
|
+
|
|
22
22
|
}
|
package/types/Texture.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export default interface TextureType {
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* 链接图片资源(单一)
|
|
5
|
-
* @param image 纹理图片
|
|
6
|
-
*/
|
|
7
|
-
useImage(image: TexImageSource): this
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* 链接图片资源(多张)
|
|
11
|
-
* @param images 纹理图片集
|
|
12
|
-
* @param width 图片宽
|
|
13
|
-
* @param height 图片高
|
|
14
|
-
*/
|
|
15
|
-
useCube(images: TexImageSource[], width: number, height: number): this
|
|
16
|
-
|
|
1
|
+
export default interface TextureType {
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 链接图片资源(单一)
|
|
5
|
+
* @param image 纹理图片
|
|
6
|
+
*/
|
|
7
|
+
useImage(image: TexImageSource): this
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 链接图片资源(多张)
|
|
11
|
+
* @param images 纹理图片集
|
|
12
|
+
* @param width 图片宽
|
|
13
|
+
* @param height 图片高
|
|
14
|
+
*/
|
|
15
|
+
useCube(images: TexImageSource[], width: number, height: number): this
|
|
16
|
+
|
|
17
17
|
}
|
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
|
}
|