@idmwx/idmui-gl4 3.6.6 → 3.6.8
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/dist/{chunk-3VYIPD3A-95990159.js → chunk-3VYIPD3A-521ddd72.js} +1 -1
- package/dist/{chunk-ANSXOGKI-b8cbbf9b.js → chunk-ANSXOGKI-52e829ce.js} +1 -1
- package/dist/{chunk-T4JIPPZO-4459c491.js → chunk-T4JIPPZO-ae4347c1.js} +1 -1
- package/dist/{download-9c153eec.js → download-131ab3d0.js} +3 -3
- package/dist/{index-05c9c8c3.js → index-0d4dba4e.js} +5629 -6020
- package/dist/index.js +12 -13
- package/dist/index.umd.cjs +30 -232
- package/dist/mapbox/src/components/bottomTimeLine/index.vue.d.ts +5 -0
- package/dist/mapbox/src/components/bottombar/index.vue.d.ts +1 -0
- package/dist/mapbox/src/components/capture/gifRecorder.d.ts +3 -0
- package/dist/mapbox/src/components/capture/index.vue.d.ts +3 -0
- package/dist/mapbox/src/components/weather/currentDirection.vue.d.ts +8 -12
- package/dist/mapbox/src/components/weather/currentParticle.vue.d.ts +0 -1
- package/dist/mapbox/src/components/weather/index.vue.d.ts +5 -9
- package/dist/mapbox/src/components/weather/prmsl.vue.d.ts +2 -9
- package/dist/mapbox/src/components/weather/sigWave.vue.d.ts +56 -0
- package/dist/mapbox/src/components/weather/sigWaveHeight.vue.d.ts +0 -8
- package/dist/mapbox/src/components/weather/swell.vue.d.ts +56 -0
- package/dist/mapbox/src/components/weather/windBarbs.vue.d.ts +12 -17
- package/dist/mapbox/src/components/weather/windParticle.vue.d.ts +0 -1
- package/dist/mapbox/src/helper/viewport.d.ts +19 -42
- package/dist/mapbox/src/index.vue.d.ts +3 -0
- package/dist/{rasterize-JS5G2XHH-6f36d89c.js → rasterize-JS5G2XHH-cc446959.js} +3 -3
- package/dist/style.css +1 -1
- package/dist/{toBlob-03d068f1.js → toBlob-6d3d669c.js} +3 -3
- package/dist/{toCanvas-7fef90d6.js → toCanvas-278ce257.js} +2 -2
- package/dist/{toImg-756022d0.js → toImg-8df15930.js} +3 -3
- package/package.json +2 -2
- package/dist/mapbox/src/components/weather/sigWaveParticle.vue.d.ts +0 -84
- package/dist/mapbox/src/components/weather/swellPartical.vue.d.ts +0 -83
|
@@ -52,6 +52,7 @@ declare namespace _sfc_main {
|
|
|
52
52
|
dragStartX: number;
|
|
53
53
|
dragScrollLeft: number;
|
|
54
54
|
hasDragged: boolean;
|
|
55
|
+
bubblePosition: null;
|
|
55
56
|
};
|
|
56
57
|
namespace computed {
|
|
57
58
|
function realTimeTimestamp(): any;
|
|
@@ -66,6 +67,8 @@ declare namespace _sfc_main {
|
|
|
66
67
|
function timelineDays(): any;
|
|
67
68
|
}
|
|
68
69
|
const watch: {
|
|
70
|
+
intervalHour(newValue: any, oldValue: any): void;
|
|
71
|
+
timelineDays(): void;
|
|
69
72
|
realTimeTimestamp: {
|
|
70
73
|
handler(timestamp: any): void;
|
|
71
74
|
immediate: boolean;
|
|
@@ -101,6 +104,8 @@ declare namespace _sfc_main {
|
|
|
101
104
|
function mounted(): void;
|
|
102
105
|
function unmounted(): void;
|
|
103
106
|
namespace methods {
|
|
107
|
+
function getNearestTimelineTimestamp(timestamp: any): any;
|
|
108
|
+
function updatePlayBubblePosition(): void;
|
|
104
109
|
function scrollToCurrentTime(): void;
|
|
105
110
|
function initCurrentTimestamp(): void;
|
|
106
111
|
function handleTimelineClick(di: any, hi: any): void;
|
|
@@ -57,6 +57,8 @@ export declare class GifRecorder {
|
|
|
57
57
|
* 合成 MP4 视频(使用 MediaRecorder API)
|
|
58
58
|
*/
|
|
59
59
|
generateMp4(): Promise<Blob | null>;
|
|
60
|
+
generateWebm(): Promise<Blob | null>;
|
|
61
|
+
private generateVideo;
|
|
60
62
|
/**
|
|
61
63
|
* 下载 GIF 文件
|
|
62
64
|
*/
|
|
@@ -65,6 +67,7 @@ export declare class GifRecorder {
|
|
|
65
67
|
* 下载 MP4 文件
|
|
66
68
|
*/
|
|
67
69
|
downloadMp4(blob: Blob, title?: string): void;
|
|
70
|
+
downloadWebm(blob: Blob, title?: string): void;
|
|
68
71
|
/**
|
|
69
72
|
* 保存为文件
|
|
70
73
|
*/
|
|
@@ -47,8 +47,10 @@ declare namespace _sfc_main {
|
|
|
47
47
|
frameCount: number;
|
|
48
48
|
gifBlob: null;
|
|
49
49
|
mp4Blob: null;
|
|
50
|
+
webmBlob: null;
|
|
50
51
|
gifUrl: string;
|
|
51
52
|
mp4Url: string;
|
|
53
|
+
webmUrl: string;
|
|
52
54
|
exportErrors: never[];
|
|
53
55
|
generating: boolean;
|
|
54
56
|
generationTimer: null;
|
|
@@ -84,5 +86,6 @@ declare namespace _sfc_main {
|
|
|
84
86
|
function handleUpload(): Promise<void>;
|
|
85
87
|
function handleDownloadGif(): void;
|
|
86
88
|
function handleDownloadMp4(): void;
|
|
89
|
+
function handleDownloadWebm(): void;
|
|
87
90
|
}
|
|
88
91
|
}
|
|
@@ -13,24 +13,21 @@ declare namespace _sfc_main {
|
|
|
13
13
|
const type_2: StringConstructor;
|
|
14
14
|
export { type_2 as type };
|
|
15
15
|
}
|
|
16
|
-
namespace
|
|
17
|
-
const type_3:
|
|
16
|
+
namespace theme {
|
|
17
|
+
const type_3: StringConstructor;
|
|
18
18
|
export { type_3 as type };
|
|
19
19
|
}
|
|
20
|
-
namespace
|
|
20
|
+
namespace mapFeather {
|
|
21
21
|
const type_4: StringConstructor;
|
|
22
22
|
export { type_4 as type };
|
|
23
23
|
}
|
|
24
|
-
namespace
|
|
25
|
-
const type_5:
|
|
24
|
+
namespace hasRampLayer {
|
|
25
|
+
const type_5: BooleanConstructor;
|
|
26
26
|
export { type_5 as type };
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
const emits: never[];
|
|
30
30
|
function data(): {
|
|
31
|
-
right: number;
|
|
32
|
-
toggle: boolean;
|
|
33
|
-
showCaption: boolean;
|
|
34
31
|
source: string;
|
|
35
32
|
directionLayer: string;
|
|
36
33
|
speedLayer: string;
|
|
@@ -38,20 +35,19 @@ declare namespace _sfc_main {
|
|
|
38
35
|
empty: turf.helpers.FeatureCollection<turf.helpers.Geometry, turf.helpers.Properties>;
|
|
39
36
|
};
|
|
40
37
|
namespace computed {
|
|
41
|
-
function opacity():
|
|
38
|
+
function opacity(): number;
|
|
39
|
+
function color(): any;
|
|
42
40
|
}
|
|
43
41
|
const watch: {
|
|
44
42
|
'current.version': {
|
|
45
43
|
handler(): void;
|
|
46
44
|
immediate: boolean;
|
|
47
45
|
};
|
|
48
|
-
|
|
46
|
+
color: {
|
|
49
47
|
handler(): void;
|
|
50
|
-
immediate: boolean;
|
|
51
48
|
};
|
|
52
49
|
};
|
|
53
50
|
namespace methods {
|
|
54
|
-
function handleMenuToggle(): void;
|
|
55
51
|
function handleRender(): void;
|
|
56
52
|
function handleClear(): void;
|
|
57
53
|
}
|
|
@@ -92,6 +92,7 @@ declare namespace _sfc_main {
|
|
|
92
92
|
checkList: never[];
|
|
93
93
|
renderKey: string;
|
|
94
94
|
iceToggleValue: undefined;
|
|
95
|
+
waveToggleValue: undefined;
|
|
95
96
|
weatherLayers: {};
|
|
96
97
|
activeWeatherLayers: never[];
|
|
97
98
|
cache: {
|
|
@@ -107,8 +108,6 @@ declare namespace _sfc_main {
|
|
|
107
108
|
particleFactor: undefined;
|
|
108
109
|
showWindParticle: boolean;
|
|
109
110
|
showCurrentParticle: boolean;
|
|
110
|
-
showSigWaveParticle: boolean;
|
|
111
|
-
showSwellParticle: boolean;
|
|
112
111
|
legendToggle: boolean;
|
|
113
112
|
legend: {
|
|
114
113
|
barbs: number[];
|
|
@@ -164,16 +163,13 @@ declare namespace _sfc_main {
|
|
|
164
163
|
iceToggleValue: {
|
|
165
164
|
handler(newV: any): void;
|
|
166
165
|
};
|
|
167
|
-
|
|
168
|
-
handler(newV: any): void;
|
|
169
|
-
};
|
|
170
|
-
showCurrentParticle: {
|
|
166
|
+
waveToggleValue: {
|
|
171
167
|
handler(newV: any): void;
|
|
172
168
|
};
|
|
173
|
-
|
|
169
|
+
showWindParticle: {
|
|
174
170
|
handler(newV: any): void;
|
|
175
171
|
};
|
|
176
|
-
|
|
172
|
+
showCurrentParticle: {
|
|
177
173
|
handler(newV: any): void;
|
|
178
174
|
};
|
|
179
175
|
isLogin: {
|
|
@@ -184,7 +180,6 @@ declare namespace _sfc_main {
|
|
|
184
180
|
function mounted(): void;
|
|
185
181
|
namespace methods {
|
|
186
182
|
function arraysEqual(arr1: any, arr2: any): boolean;
|
|
187
|
-
function normalizeWaveSelection(keys: any): any;
|
|
188
183
|
function fetchCache(): void;
|
|
189
184
|
function handleMenuToggle(): void;
|
|
190
185
|
function handleFastWeatherToggle(key: any): void;
|
|
@@ -198,5 +193,6 @@ declare namespace _sfc_main {
|
|
|
198
193
|
function handleRampColorInitial(): void;
|
|
199
194
|
function handleDrawWeather4Json(): void;
|
|
200
195
|
function handleMove4Weather(): void;
|
|
196
|
+
function handleBboxClip(fc: any, bounds: any): any[];
|
|
201
197
|
}
|
|
202
198
|
}
|
|
@@ -17,18 +17,12 @@ declare namespace _sfc_main {
|
|
|
17
17
|
const type_3: BooleanConstructor;
|
|
18
18
|
export { type_3 as type };
|
|
19
19
|
}
|
|
20
|
-
namespace activeWeatherLayers {
|
|
21
|
-
const type_4: ArrayConstructor;
|
|
22
|
-
export { type_4 as type };
|
|
23
|
-
}
|
|
24
20
|
namespace theme {
|
|
25
|
-
const
|
|
26
|
-
export {
|
|
21
|
+
const type_4: StringConstructor;
|
|
22
|
+
export { type_4 as type };
|
|
27
23
|
}
|
|
28
24
|
}
|
|
29
25
|
function data(): {
|
|
30
|
-
right: number;
|
|
31
|
-
toggle: boolean;
|
|
32
26
|
source: string;
|
|
33
27
|
layer: string;
|
|
34
28
|
labelLayer: string;
|
|
@@ -42,7 +36,6 @@ declare namespace _sfc_main {
|
|
|
42
36
|
};
|
|
43
37
|
};
|
|
44
38
|
namespace methods {
|
|
45
|
-
function handleMenuToggle(): void;
|
|
46
39
|
function handleRender(): void;
|
|
47
40
|
function handleClear(): void;
|
|
48
41
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export default _sfc_main;
|
|
2
|
+
declare namespace _sfc_main {
|
|
3
|
+
const name: string;
|
|
4
|
+
namespace props {
|
|
5
|
+
namespace simple {
|
|
6
|
+
export const type: BooleanConstructor;
|
|
7
|
+
const _default: boolean;
|
|
8
|
+
export { _default as default };
|
|
9
|
+
}
|
|
10
|
+
namespace factor {
|
|
11
|
+
const type_1: ObjectConstructor;
|
|
12
|
+
export { type_1 as type };
|
|
13
|
+
}
|
|
14
|
+
namespace viewport {
|
|
15
|
+
const type_2: ObjectConstructor;
|
|
16
|
+
export { type_2 as type };
|
|
17
|
+
}
|
|
18
|
+
namespace bottom {
|
|
19
|
+
const type_3: StringConstructor;
|
|
20
|
+
export { type_3 as type };
|
|
21
|
+
const _default_1: string;
|
|
22
|
+
export { _default_1 as default };
|
|
23
|
+
}
|
|
24
|
+
namespace menuToggle {
|
|
25
|
+
const type_4: ObjectConstructor;
|
|
26
|
+
export { type_4 as type };
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function data(): {
|
|
30
|
+
program: undefined;
|
|
31
|
+
context: undefined;
|
|
32
|
+
texture: undefined;
|
|
33
|
+
rampColor: undefined;
|
|
34
|
+
aPositionBuffer: undefined;
|
|
35
|
+
webgl: WebGL;
|
|
36
|
+
etime: undefined;
|
|
37
|
+
right: number;
|
|
38
|
+
};
|
|
39
|
+
const watch: {
|
|
40
|
+
'factor.version': {
|
|
41
|
+
handler(): void;
|
|
42
|
+
immediate: boolean;
|
|
43
|
+
};
|
|
44
|
+
'menuToggle.v': {
|
|
45
|
+
handler(): void;
|
|
46
|
+
immediate: boolean;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
namespace methods {
|
|
50
|
+
function handleRender(): void;
|
|
51
|
+
function handleClear(): void;
|
|
52
|
+
function handleSetup(): void;
|
|
53
|
+
function handleDraw(): Promise<void>;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
import { WebGL } from '../../helper/viewport.ts';
|
|
@@ -13,15 +13,8 @@ declare namespace _sfc_main {
|
|
|
13
13
|
const type_2: StringConstructor;
|
|
14
14
|
export { type_2 as type };
|
|
15
15
|
}
|
|
16
|
-
namespace menuToggle {
|
|
17
|
-
const type_3: ObjectConstructor;
|
|
18
|
-
export { type_3 as type };
|
|
19
|
-
}
|
|
20
16
|
}
|
|
21
17
|
function data(): {
|
|
22
|
-
right: number;
|
|
23
|
-
toggle: boolean;
|
|
24
|
-
showCaption: boolean;
|
|
25
18
|
source: string;
|
|
26
19
|
heightLayer: string;
|
|
27
20
|
heightLabelLayer: string;
|
|
@@ -34,7 +27,6 @@ declare namespace _sfc_main {
|
|
|
34
27
|
};
|
|
35
28
|
};
|
|
36
29
|
namespace methods {
|
|
37
|
-
function handleMenuToggle(): void;
|
|
38
30
|
function handleRender(): void;
|
|
39
31
|
function handleClear(): void;
|
|
40
32
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export default _sfc_main;
|
|
2
|
+
declare namespace _sfc_main {
|
|
3
|
+
const name: string;
|
|
4
|
+
namespace props {
|
|
5
|
+
namespace simple {
|
|
6
|
+
export const type: BooleanConstructor;
|
|
7
|
+
const _default: boolean;
|
|
8
|
+
export { _default as default };
|
|
9
|
+
}
|
|
10
|
+
namespace factor {
|
|
11
|
+
const type_1: ObjectConstructor;
|
|
12
|
+
export { type_1 as type };
|
|
13
|
+
}
|
|
14
|
+
namespace viewport {
|
|
15
|
+
const type_2: ObjectConstructor;
|
|
16
|
+
export { type_2 as type };
|
|
17
|
+
}
|
|
18
|
+
namespace bottom {
|
|
19
|
+
const type_3: StringConstructor;
|
|
20
|
+
export { type_3 as type };
|
|
21
|
+
const _default_1: string;
|
|
22
|
+
export { _default_1 as default };
|
|
23
|
+
}
|
|
24
|
+
namespace menuToggle {
|
|
25
|
+
const type_4: ObjectConstructor;
|
|
26
|
+
export { type_4 as type };
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function data(): {
|
|
30
|
+
program: undefined;
|
|
31
|
+
context: undefined;
|
|
32
|
+
texture: undefined;
|
|
33
|
+
rampColor: undefined;
|
|
34
|
+
aPositionBuffer: undefined;
|
|
35
|
+
webgl: WebGL;
|
|
36
|
+
etime: undefined;
|
|
37
|
+
right: number;
|
|
38
|
+
};
|
|
39
|
+
const watch: {
|
|
40
|
+
'factor.version': {
|
|
41
|
+
handler(): void;
|
|
42
|
+
immediate: boolean;
|
|
43
|
+
};
|
|
44
|
+
'menuToggle.v': {
|
|
45
|
+
handler(): void;
|
|
46
|
+
immediate: boolean;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
namespace methods {
|
|
50
|
+
function handleRender(): void;
|
|
51
|
+
function handleClear(): void;
|
|
52
|
+
function handleSetup(): void;
|
|
53
|
+
function handleDraw(): Promise<void>;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
import { WebGL } from '../../helper/viewport.ts';
|
|
@@ -9,36 +9,32 @@ declare namespace _sfc_main {
|
|
|
9
9
|
const type_1: ObjectConstructor;
|
|
10
10
|
export { type_1 as type };
|
|
11
11
|
}
|
|
12
|
-
namespace
|
|
13
|
-
const type_2:
|
|
12
|
+
namespace beforeLayer {
|
|
13
|
+
const type_2: StringConstructor;
|
|
14
14
|
export { type_2 as type };
|
|
15
15
|
}
|
|
16
|
-
namespace
|
|
16
|
+
namespace theme {
|
|
17
17
|
const type_3: StringConstructor;
|
|
18
18
|
export { type_3 as type };
|
|
19
19
|
}
|
|
20
|
-
namespace
|
|
21
|
-
const type_4:
|
|
20
|
+
namespace mapFeather {
|
|
21
|
+
const type_4: StringConstructor;
|
|
22
22
|
export { type_4 as type };
|
|
23
23
|
}
|
|
24
|
-
namespace
|
|
25
|
-
const type_5:
|
|
24
|
+
namespace activeWeatherLayers {
|
|
25
|
+
const type_5: ArrayConstructor;
|
|
26
26
|
export { type_5 as type };
|
|
27
27
|
}
|
|
28
|
-
namespace
|
|
29
|
-
const type_6:
|
|
28
|
+
namespace hasRampLayer {
|
|
29
|
+
const type_6: BooleanConstructor;
|
|
30
30
|
export { type_6 as type };
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
const emits: never[];
|
|
34
34
|
function data(): {
|
|
35
|
-
toggle: boolean;
|
|
36
|
-
showCaption: boolean;
|
|
37
35
|
source: string;
|
|
38
36
|
barbs: number[];
|
|
39
37
|
empty: turf.helpers.FeatureCollection<turf.helpers.Geometry, turf.helpers.Properties>;
|
|
40
|
-
right: number;
|
|
41
|
-
bottom: number;
|
|
42
38
|
windBarbLoaded: boolean;
|
|
43
39
|
svgs: {
|
|
44
40
|
'000kts': string;
|
|
@@ -67,20 +63,19 @@ declare namespace _sfc_main {
|
|
|
67
63
|
};
|
|
68
64
|
};
|
|
69
65
|
namespace computed {
|
|
70
|
-
function opacity():
|
|
66
|
+
function opacity(): number;
|
|
67
|
+
function color(): any;
|
|
71
68
|
}
|
|
72
69
|
const watch: {
|
|
73
70
|
'wind.version': {
|
|
74
71
|
handler(): void;
|
|
75
72
|
immediate: boolean;
|
|
76
73
|
};
|
|
77
|
-
|
|
74
|
+
color: {
|
|
78
75
|
handler(): void;
|
|
79
|
-
immediate: boolean;
|
|
80
76
|
};
|
|
81
77
|
};
|
|
82
78
|
namespace methods {
|
|
83
|
-
function handleMenuToggle(): void;
|
|
84
79
|
function handleRender(): void;
|
|
85
80
|
function handleClear(): void;
|
|
86
81
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import mapboxgl from 'mapbox-gl';
|
|
2
|
-
export type GLContext = WebGLRenderingContext | WebGL2RenderingContext;
|
|
3
2
|
export interface ParticleOptions {
|
|
4
3
|
fadeOpacity: number;
|
|
5
4
|
speedFactor: number;
|
|
@@ -8,8 +7,6 @@ export interface ParticleOptions {
|
|
|
8
7
|
uvRange: number[];
|
|
9
8
|
sRange: number[];
|
|
10
9
|
scale: number;
|
|
11
|
-
lineLength?: number;
|
|
12
|
-
lineOpacity?: number;
|
|
13
10
|
}
|
|
14
11
|
export declare class Viewport {
|
|
15
12
|
map: mapboxgl.Map;
|
|
@@ -59,9 +56,6 @@ export declare class Viewport {
|
|
|
59
56
|
toggleParticle(visible: boolean): void;
|
|
60
57
|
}
|
|
61
58
|
export declare class WebGL {
|
|
62
|
-
isWebGL2(gl: GLContext): gl is WebGL2RenderingContext;
|
|
63
|
-
createContext(canvas: HTMLCanvasElement, attributes?: WebGLContextAttributes): GLContext | null;
|
|
64
|
-
createParticleContext(canvas: HTMLCanvasElement): GLContext | null;
|
|
65
59
|
/**
|
|
66
60
|
* 创建着色器
|
|
67
61
|
* @see https://webglfundamentals.org/webgl/lessons/zh_cn/webgl-shaders-and-glsl.html
|
|
@@ -69,7 +63,7 @@ export declare class WebGL {
|
|
|
69
63
|
* @param type [VERTEX_SHADER, FRAGMENT_SHADER]
|
|
70
64
|
* @param schema 着色器渲染代码[GLSL]
|
|
71
65
|
*/
|
|
72
|
-
createShader(gl:
|
|
66
|
+
createShader(gl: WebGLRenderingContext, type: GLenum, schema: any): WebGLShader | null;
|
|
73
67
|
/**
|
|
74
68
|
* 创建纹理
|
|
75
69
|
* @see https://blog.csdn.net/qq_37987033/article/details/128745577
|
|
@@ -81,7 +75,7 @@ export declare class WebGL {
|
|
|
81
75
|
* @param width??
|
|
82
76
|
* @param height??
|
|
83
77
|
*/
|
|
84
|
-
createTexture(gl:
|
|
78
|
+
createTexture(gl: WebGLRenderingContext, minFilter: GLint, magFilter: GLint, wrapFilter: GLint, data: Uint8Array | HTMLCanvasElement | HTMLImageElement | undefined, width?: number | undefined, height?: number | undefined): WebGLTexture | null;
|
|
85
79
|
/**
|
|
86
80
|
* 创建数据资源
|
|
87
81
|
* @param type [array, element]
|
|
@@ -89,14 +83,14 @@ export declare class WebGL {
|
|
|
89
83
|
* element: ELEMENT_ARRAY_BUFFER
|
|
90
84
|
* @param resource 顶点数据
|
|
91
85
|
*/
|
|
92
|
-
createDataBuffer(gl:
|
|
86
|
+
createDataBuffer(gl: WebGLRenderingContext, type: string, resource: BufferSource | undefined): WebGLBuffer | null;
|
|
93
87
|
/**
|
|
94
88
|
* 创建程序
|
|
95
89
|
* @param gl
|
|
96
90
|
* @param vertexSchema
|
|
97
91
|
* @param fragmentSchema
|
|
98
92
|
*/
|
|
99
|
-
createProgram(gl:
|
|
93
|
+
createProgram(gl: WebGLRenderingContext, vertexSchema: string, fragmentSchema: string): WebGLProgram | null;
|
|
100
94
|
/**
|
|
101
95
|
* 创建程序并提取attrib & uniform参数
|
|
102
96
|
* @param gl
|
|
@@ -108,28 +102,25 @@ export declare class WebGL {
|
|
|
108
102
|
* 初始化渐变色纹理
|
|
109
103
|
* @param colors
|
|
110
104
|
*/
|
|
111
|
-
setup(context:
|
|
105
|
+
setup(context: WebGLRenderingContext | null, colors: Array<[number, string]>, int8?: boolean, width?: number, height?: number): {
|
|
112
106
|
canvas: HTMLCanvasElement;
|
|
113
107
|
texture: WebGLTexture | null;
|
|
114
108
|
} | undefined;
|
|
115
|
-
setupParticle(context:
|
|
109
|
+
setupParticle(context: WebGLRenderingContext, num?: number): {
|
|
116
110
|
resolution: number;
|
|
117
111
|
total: number;
|
|
118
112
|
texture0: WebGLTexture | null;
|
|
119
113
|
texture1: WebGLTexture | null;
|
|
120
114
|
indexBuffer: WebGLBuffer | null;
|
|
121
|
-
renderMode: "points" | "lines";
|
|
122
|
-
lifecycleTexture0: WebGLTexture | null;
|
|
123
|
-
lifecycleTexture1: WebGLTexture | null;
|
|
124
115
|
};
|
|
125
|
-
bind(context:
|
|
126
|
-
program?: undefined;
|
|
127
|
-
aPositionBuffer?: undefined;
|
|
128
|
-
} | {
|
|
116
|
+
bind(context: WebGLRenderingContext | null, vertexSchema: string, fragmentSchema: string): {
|
|
129
117
|
program: WebGLProgram;
|
|
130
118
|
aPositionBuffer: WebGLBuffer | null;
|
|
119
|
+
} | {
|
|
120
|
+
program?: undefined;
|
|
121
|
+
aPositionBuffer?: undefined;
|
|
131
122
|
};
|
|
132
|
-
bindParticle(gl:
|
|
123
|
+
bindParticle(gl: WebGLRenderingContext, drawVert: string, drawFrag: string, quadVert: string, screenFrag: string, updateFrag: string): {
|
|
133
124
|
particle: {
|
|
134
125
|
program: WebGLProgram;
|
|
135
126
|
} | undefined;
|
|
@@ -141,45 +132,31 @@ export declare class WebGL {
|
|
|
141
132
|
} | undefined;
|
|
142
133
|
quadBuffer: WebGLBuffer | null;
|
|
143
134
|
frameBuffer: WebGLFramebuffer | null;
|
|
144
|
-
vertexArray: WebGLVertexArrayObject | null;
|
|
145
135
|
};
|
|
146
|
-
draw(viewport: Viewport, context:
|
|
147
|
-
drawParticle(viewport: Viewport, gl:
|
|
136
|
+
draw(viewport: Viewport, context: WebGLRenderingContext | null, program: WebGLProgram | null, texture: WebGLTexture | null, colorTexture: WebGLTexture | null, aPositionBuffer: WebGLBuffer | null, options?: ParticleOptions): void;
|
|
137
|
+
drawParticle(viewport: Viewport, gl: WebGLRenderingContext, factorTexture: WebGLTexture, wrapper: any, options: ParticleOptions): void;
|
|
148
138
|
private renderScreen;
|
|
149
139
|
private renderScreenTexture;
|
|
150
|
-
renderParticles(viewport: Viewport, gl:
|
|
151
|
-
updateParticles(viewport: Viewport, gl:
|
|
152
|
-
resize(viewport: Viewport, gl:
|
|
153
|
-
|
|
140
|
+
renderParticles(viewport: Viewport, gl: WebGLRenderingContext, wrapper: any, options: ParticleOptions): void;
|
|
141
|
+
updateParticles(viewport: Viewport, gl: WebGLRenderingContext, wrapper: any, options: ParticleOptions): void;
|
|
142
|
+
resize(viewport: Viewport, gl: WebGLRenderingContext): {
|
|
143
|
+
screenTexture: WebGLTexture | null;
|
|
144
|
+
backgroundTexture: WebGLTexture | null;
|
|
145
|
+
};
|
|
154
146
|
loadImg(data: any): Promise<HTMLImageElement>;
|
|
155
147
|
}
|
|
156
148
|
/**
|
|
157
149
|
* WebGL (GLSL)渲染语法
|
|
158
150
|
*/
|
|
159
151
|
export declare class WebGLSchema {
|
|
160
|
-
static toWebGL2(source: string, stage: 'vertex' | 'fragment'): string;
|
|
161
152
|
static vertexSchema: string;
|
|
162
153
|
static uvFragmentSchema: string;
|
|
163
|
-
static sigWaveFragmentSchema: string;
|
|
164
154
|
static fragmentSchema: string;
|
|
165
155
|
}
|
|
166
156
|
export declare class ParticleSchema {
|
|
167
|
-
static getSources(webgl2: boolean): [string, string, string, string, string];
|
|
168
|
-
private static fragmentWebGL2;
|
|
169
|
-
static vertexSchemaWebGL2: string;
|
|
170
|
-
static quadVertSchemaWebGL2: string;
|
|
171
157
|
static vertexSchema: string;
|
|
172
158
|
static fragmentSchema: string;
|
|
173
159
|
static quadVertSchema: string;
|
|
174
160
|
static screenFragmentSchema: string;
|
|
175
161
|
static updateFragmentSchema: string;
|
|
176
162
|
}
|
|
177
|
-
export declare class SigWaveParticleSchema extends ParticleSchema {
|
|
178
|
-
private static lifecycleSchema;
|
|
179
|
-
private static waveSamplingSchema;
|
|
180
|
-
private static linePositionSchema;
|
|
181
|
-
static vertexSchema: string;
|
|
182
|
-
static vertexSchemaWebGL2: string;
|
|
183
|
-
static fragmentSchema: string;
|
|
184
|
-
static updateFragmentSchema: string;
|
|
185
|
-
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as l } from "./chunk-ANSXOGKI-
|
|
2
|
-
import "./chunk-3VYIPD3A-
|
|
3
|
-
import "./index-
|
|
1
|
+
import { d as l } from "./chunk-ANSXOGKI-52e829ce.js";
|
|
2
|
+
import "./chunk-3VYIPD3A-521ddd72.js";
|
|
3
|
+
import "./index-0d4dba4e.js";
|
|
4
4
|
import "axios";
|
|
5
5
|
import "vuetify";
|
|
6
6
|
import "vue";
|