@idmwx/idmui-gl4 3.6.4 → 3.6.6

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 (24) hide show
  1. package/dist/{chunk-3VYIPD3A-a7689b18.js → chunk-3VYIPD3A-95990159.js} +1 -1
  2. package/dist/{chunk-ANSXOGKI-b4e893f0.js → chunk-ANSXOGKI-b8cbbf9b.js} +1 -1
  3. package/dist/{chunk-T4JIPPZO-03866c8a.js → chunk-T4JIPPZO-4459c491.js} +1 -1
  4. package/dist/{download-711f8b0b.js → download-9c153eec.js} +3 -3
  5. package/dist/{index-d1d43372.js → index-05c9c8c3.js} +5721 -5302
  6. package/dist/index.js +13 -12
  7. package/dist/index.umd.cjs +233 -31
  8. package/dist/mapbox/src/components/bottomTimeLine/index.vue.d.ts +15 -7
  9. package/dist/mapbox/src/components/capture/gifRecorder.d.ts +0 -3
  10. package/dist/mapbox/src/components/capture/index.vue.d.ts +0 -3
  11. package/dist/mapbox/src/components/weather/currentParticle.vue.d.ts +1 -0
  12. package/dist/mapbox/src/components/weather/index.vue.d.ts +9 -5
  13. package/dist/mapbox/src/components/weather/sigWaveParticle.vue.d.ts +84 -0
  14. package/dist/mapbox/src/components/weather/swellPartical.vue.d.ts +83 -0
  15. package/dist/mapbox/src/components/weather/windParticle.vue.d.ts +1 -0
  16. package/dist/mapbox/src/helper/viewport.d.ts +42 -19
  17. package/dist/{rasterize-JS5G2XHH-95f562df.js → rasterize-JS5G2XHH-6f36d89c.js} +3 -3
  18. package/dist/style.css +1 -1
  19. package/dist/{toBlob-3f65ef7a.js → toBlob-03d068f1.js} +3 -3
  20. package/dist/{toCanvas-1bf9d824.js → toCanvas-7fef90d6.js} +2 -2
  21. package/dist/{toImg-c00a2909.js → toImg-756022d0.js} +3 -3
  22. package/package.json +2 -2
  23. package/dist/mapbox/src/components/weather/sigWave.vue.d.ts +0 -56
  24. package/dist/mapbox/src/components/weather/swell.vue.d.ts +0 -56
@@ -3,14 +3,18 @@ declare namespace _sfc_main {
3
3
  const name: string;
4
4
  const components: undefined;
5
5
  namespace props {
6
+ namespace realTime {
7
+ const type: StringConstructor;
8
+ }
6
9
  namespace menuToggle {
7
- export const type: ObjectConstructor;
10
+ const type_1: ObjectConstructor;
11
+ export { type_1 as type };
8
12
  const _default: {};
9
13
  export { _default as default };
10
14
  }
11
15
  namespace weatherCheckList {
12
- const type_1: ArrayConstructor;
13
- export { type_1 as type };
16
+ const type_2: ArrayConstructor;
17
+ export { type_2 as type };
14
18
  }
15
19
  }
16
20
  const emits: string[];
@@ -50,6 +54,7 @@ declare namespace _sfc_main {
50
54
  hasDragged: boolean;
51
55
  };
52
56
  namespace computed {
57
+ function realTimeTimestamp(): any;
53
58
  function minTimestamp(): any;
54
59
  function maxTimestamp(): any;
55
60
  function timelineStartDate(): any;
@@ -61,6 +66,10 @@ declare namespace _sfc_main {
61
66
  function timelineDays(): any;
62
67
  }
63
68
  const watch: {
69
+ realTimeTimestamp: {
70
+ handler(timestamp: any): void;
71
+ immediate: boolean;
72
+ };
64
73
  'menuToggle.v': {
65
74
  handler(): void;
66
75
  immediate: boolean;
@@ -84,17 +93,15 @@ declare namespace _sfc_main {
84
93
  handler(newV: any, oldV: any): void;
85
94
  immediate: boolean;
86
95
  };
87
- show: {
88
- handler(): void;
89
- deep: boolean;
90
- };
91
96
  gifEnabled: {
92
97
  handler(newV: any, oldV: any): void;
93
98
  immediate: boolean;
94
99
  };
95
100
  };
96
101
  function mounted(): void;
102
+ function unmounted(): void;
97
103
  namespace methods {
104
+ function scrollToCurrentTime(): void;
98
105
  function initCurrentTimestamp(): void;
99
106
  function handleTimelineClick(di: any, hi: any): void;
100
107
  function handleDateClick(di: any, e: any): void;
@@ -111,5 +118,6 @@ declare namespace _sfc_main {
111
118
  function animateSpeeds(timestamp: any): void;
112
119
  function handleClickFastWeather(key: any): void;
113
120
  function handleClickFastMore(): void;
121
+ function handleCloseRecord(): void;
114
122
  }
115
123
  }
@@ -57,8 +57,6 @@ 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;
62
60
  /**
63
61
  * 下载 GIF 文件
64
62
  */
@@ -67,7 +65,6 @@ export declare class GifRecorder {
67
65
  * 下载 MP4 文件
68
66
  */
69
67
  downloadMp4(blob: Blob, title?: string): void;
70
- downloadWebm(blob: Blob, title?: string): void;
71
68
  /**
72
69
  * 保存为文件
73
70
  */
@@ -47,10 +47,8 @@ declare namespace _sfc_main {
47
47
  frameCount: number;
48
48
  gifBlob: null;
49
49
  mp4Blob: null;
50
- webmBlob: null;
51
50
  gifUrl: string;
52
51
  mp4Url: string;
53
- webmUrl: string;
54
52
  exportErrors: never[];
55
53
  generating: boolean;
56
54
  generationTimer: null;
@@ -86,6 +84,5 @@ declare namespace _sfc_main {
86
84
  function handleUpload(): Promise<void>;
87
85
  function handleDownloadGif(): void;
88
86
  function handleDownloadMp4(): void;
89
- function handleDownloadWebm(): void;
90
87
  }
91
88
  }
@@ -57,6 +57,7 @@ declare namespace _sfc_main {
57
57
  immediate: boolean;
58
58
  };
59
59
  };
60
+ function beforeUnmount(): void;
60
61
  namespace methods {
61
62
  function handleRender(): Promise<void>;
62
63
  function handleSetup(): void;
@@ -92,7 +92,6 @@ declare namespace _sfc_main {
92
92
  checkList: never[];
93
93
  renderKey: string;
94
94
  iceToggleValue: undefined;
95
- waveToggleValue: undefined;
96
95
  weatherLayers: {};
97
96
  activeWeatherLayers: never[];
98
97
  cache: {
@@ -108,6 +107,8 @@ declare namespace _sfc_main {
108
107
  particleFactor: undefined;
109
108
  showWindParticle: boolean;
110
109
  showCurrentParticle: boolean;
110
+ showSigWaveParticle: boolean;
111
+ showSwellParticle: boolean;
111
112
  legendToggle: boolean;
112
113
  legend: {
113
114
  barbs: number[];
@@ -163,15 +164,18 @@ declare namespace _sfc_main {
163
164
  iceToggleValue: {
164
165
  handler(newV: any): void;
165
166
  };
166
- waveToggleValue: {
167
- handler(newV: any): void;
168
- };
169
167
  showWindParticle: {
170
168
  handler(newV: any): void;
171
169
  };
172
170
  showCurrentParticle: {
173
171
  handler(newV: any): void;
174
172
  };
173
+ showSigWaveParticle: {
174
+ handler(newV: any): void;
175
+ };
176
+ showSwellParticle: {
177
+ handler(newV: any): void;
178
+ };
175
179
  isLogin: {
176
180
  handler(newV: any): void;
177
181
  immediate: boolean;
@@ -180,6 +184,7 @@ declare namespace _sfc_main {
180
184
  function mounted(): void;
181
185
  namespace methods {
182
186
  function arraysEqual(arr1: any, arr2: any): boolean;
187
+ function normalizeWaveSelection(keys: any): any;
183
188
  function fetchCache(): void;
184
189
  function handleMenuToggle(): void;
185
190
  function handleFastWeatherToggle(key: any): void;
@@ -193,6 +198,5 @@ declare namespace _sfc_main {
193
198
  function handleRampColorInitial(): void;
194
199
  function handleDrawWeather4Json(): void;
195
200
  function handleMove4Weather(): void;
196
- function handleBboxClip(fc: any, bounds: any): any[];
197
201
  }
198
202
  }
@@ -0,0 +1,84 @@
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
+ export { Viewport as type };
16
+ }
17
+ namespace menuToggle {
18
+ const type_2: ObjectConstructor;
19
+ export { type_2 as type };
20
+ }
21
+ }
22
+ function data(): {
23
+ program: undefined;
24
+ context: undefined;
25
+ texture: undefined;
26
+ rampColor: undefined;
27
+ aPositionBuffer: undefined;
28
+ webgl: WebGL;
29
+ rendererKey: string;
30
+ backgroundFragmentSchema: string;
31
+ etime: undefined;
32
+ dataSource: undefined;
33
+ imageSource: undefined;
34
+ imageEtime: undefined;
35
+ imagePromise: undefined;
36
+ drawVersion: number;
37
+ wrapper: undefined;
38
+ animation: undefined;
39
+ lastParticleFrameTime: undefined;
40
+ particleContext: undefined;
41
+ particleTexture: undefined;
42
+ particleCount: number;
43
+ particleOptions: {
44
+ fadeOpacity: number;
45
+ lineLength: number;
46
+ lineOpacity: number;
47
+ speedFactor: number;
48
+ dropRate: number;
49
+ dropRateBump: number;
50
+ uvRange: number[];
51
+ sRange: number[];
52
+ };
53
+ paused: boolean;
54
+ initial: boolean;
55
+ right: number;
56
+ };
57
+ const watch: {
58
+ 'factor.version': {
59
+ handler(): Promise<void>;
60
+ immediate: boolean;
61
+ };
62
+ 'factor.particle': {
63
+ handler(newVal: any, oldVal: any): Promise<void>;
64
+ };
65
+ 'menuToggle.v': {
66
+ handler(): void;
67
+ immediate: boolean;
68
+ };
69
+ };
70
+ function beforeUnmount(): void;
71
+ namespace methods {
72
+ function handleRender(): Promise<void>;
73
+ function handleSetup(): void;
74
+ function handleParticleSetup(): void;
75
+ function handleDraw(): Promise<void>;
76
+ function handleResize(): void;
77
+ function handlePause(): void;
78
+ function handlePlay(): void;
79
+ function handleClearParticle(): void;
80
+ function handleClear(): void;
81
+ }
82
+ }
83
+ import { Viewport } from '../../helper/viewport.ts';
84
+ import { WebGL } from '../../helper/viewport.ts';
@@ -0,0 +1,83 @@
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
+ export { Viewport as type };
16
+ }
17
+ namespace menuToggle {
18
+ const type_2: ObjectConstructor;
19
+ export { type_2 as type };
20
+ }
21
+ }
22
+ function data(): {
23
+ program: undefined;
24
+ context: undefined;
25
+ texture: undefined;
26
+ rampColor: undefined;
27
+ aPositionBuffer: undefined;
28
+ webgl: WebGL;
29
+ rendererKey: string;
30
+ backgroundFragmentSchema: string;
31
+ etime: undefined;
32
+ dataSource: undefined;
33
+ imageSource: undefined;
34
+ imagePromise: undefined;
35
+ drawVersion: number;
36
+ wrapper: undefined;
37
+ animation: undefined;
38
+ lastParticleFrameTime: undefined;
39
+ particleContext: undefined;
40
+ particleTexture: undefined;
41
+ particleCount: number;
42
+ particleOptions: {
43
+ fadeOpacity: number;
44
+ lineLength: number;
45
+ lineOpacity: number;
46
+ speedFactor: number;
47
+ dropRate: number;
48
+ dropRateBump: number;
49
+ uvRange: number[];
50
+ sRange: number[];
51
+ };
52
+ paused: boolean;
53
+ initial: boolean;
54
+ right: number;
55
+ };
56
+ const watch: {
57
+ 'factor.version': {
58
+ handler(): Promise<void>;
59
+ immediate: boolean;
60
+ };
61
+ 'factor.particle': {
62
+ handler(newVal: any, oldVal: any): Promise<void>;
63
+ };
64
+ 'menuToggle.v': {
65
+ handler(): void;
66
+ immediate: boolean;
67
+ };
68
+ };
69
+ function beforeUnmount(): void;
70
+ namespace methods {
71
+ function handleRender(): Promise<void>;
72
+ function handleSetup(): void;
73
+ function handleParticleSetup(): void;
74
+ function handleDraw(): Promise<void>;
75
+ function handleResize(): void;
76
+ function handlePause(): void;
77
+ function handlePlay(): void;
78
+ function handleClearParticle(): void;
79
+ function handleClear(): void;
80
+ }
81
+ }
82
+ import { Viewport } from '../../helper/viewport.ts';
83
+ import { WebGL } from '../../helper/viewport.ts';
@@ -56,6 +56,7 @@ declare namespace _sfc_main {
56
56
  immediate: boolean;
57
57
  };
58
58
  };
59
+ function beforeUnmount(): void;
59
60
  namespace methods {
60
61
  function handleRender(): Promise<void>;
61
62
  function handleSetup(): void;
@@ -1,4 +1,5 @@
1
1
  import mapboxgl from 'mapbox-gl';
2
+ export type GLContext = WebGLRenderingContext | WebGL2RenderingContext;
2
3
  export interface ParticleOptions {
3
4
  fadeOpacity: number;
4
5
  speedFactor: number;
@@ -7,6 +8,8 @@ export interface ParticleOptions {
7
8
  uvRange: number[];
8
9
  sRange: number[];
9
10
  scale: number;
11
+ lineLength?: number;
12
+ lineOpacity?: number;
10
13
  }
11
14
  export declare class Viewport {
12
15
  map: mapboxgl.Map;
@@ -56,6 +59,9 @@ export declare class Viewport {
56
59
  toggleParticle(visible: boolean): void;
57
60
  }
58
61
  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;
59
65
  /**
60
66
  * 创建着色器
61
67
  * @see https://webglfundamentals.org/webgl/lessons/zh_cn/webgl-shaders-and-glsl.html
@@ -63,7 +69,7 @@ export declare class WebGL {
63
69
  * @param type [VERTEX_SHADER, FRAGMENT_SHADER]
64
70
  * @param schema 着色器渲染代码[GLSL]
65
71
  */
66
- createShader(gl: WebGLRenderingContext, type: GLenum, schema: any): WebGLShader | null;
72
+ createShader(gl: GLContext, type: GLenum, schema: string): WebGLShader | null;
67
73
  /**
68
74
  * 创建纹理
69
75
  * @see https://blog.csdn.net/qq_37987033/article/details/128745577
@@ -75,7 +81,7 @@ export declare class WebGL {
75
81
  * @param width??
76
82
  * @param height??
77
83
  */
78
- createTexture(gl: WebGLRenderingContext, minFilter: GLint, magFilter: GLint, wrapFilter: GLint, data: Uint8Array | HTMLCanvasElement | HTMLImageElement | undefined, width?: number | undefined, height?: number | undefined): WebGLTexture | null;
84
+ createTexture(gl: GLContext, minFilter: GLint, magFilter: GLint, wrapFilter: GLint, data: Uint8Array | HTMLCanvasElement | HTMLImageElement | null | undefined, width?: number | undefined, height?: number | undefined): WebGLTexture | null;
79
85
  /**
80
86
  * 创建数据资源
81
87
  * @param type [array, element]
@@ -83,14 +89,14 @@ export declare class WebGL {
83
89
  * element: ELEMENT_ARRAY_BUFFER
84
90
  * @param resource 顶点数据
85
91
  */
86
- createDataBuffer(gl: WebGLRenderingContext, type: string, resource: BufferSource | undefined): WebGLBuffer | null;
92
+ createDataBuffer(gl: GLContext, type: string, resource: BufferSource | undefined): WebGLBuffer | null;
87
93
  /**
88
94
  * 创建程序
89
95
  * @param gl
90
96
  * @param vertexSchema
91
97
  * @param fragmentSchema
92
98
  */
93
- createProgram(gl: WebGLRenderingContext, vertexSchema: string, fragmentSchema: string): WebGLProgram | null;
99
+ createProgram(gl: GLContext, vertexSchema: string, fragmentSchema: string): WebGLProgram | null;
94
100
  /**
95
101
  * 创建程序并提取attrib & uniform参数
96
102
  * @param gl
@@ -102,25 +108,28 @@ export declare class WebGL {
102
108
  * 初始化渐变色纹理
103
109
  * @param colors
104
110
  */
105
- setup(context: WebGLRenderingContext | null, colors: Array<[number, string]>, int8?: boolean, width?: number, height?: number): {
111
+ setup(context: GLContext | null, colors: Array<[number, string]>, int8?: boolean, width?: number, height?: number): {
106
112
  canvas: HTMLCanvasElement;
107
113
  texture: WebGLTexture | null;
108
114
  } | undefined;
109
- setupParticle(context: WebGLRenderingContext, num?: number): {
115
+ setupParticle(context: GLContext, num?: number, renderMode?: 'points' | 'lines', withLifecycle?: boolean): {
110
116
  resolution: number;
111
117
  total: number;
112
118
  texture0: WebGLTexture | null;
113
119
  texture1: WebGLTexture | null;
114
120
  indexBuffer: WebGLBuffer | null;
121
+ renderMode: "points" | "lines";
122
+ lifecycleTexture0: WebGLTexture | null;
123
+ lifecycleTexture1: WebGLTexture | null;
115
124
  };
116
- bind(context: WebGLRenderingContext | null, vertexSchema: string, fragmentSchema: string): {
117
- program: WebGLProgram;
118
- aPositionBuffer: WebGLBuffer | null;
119
- } | {
125
+ bind(context: GLContext | null, vertexSchema: string, fragmentSchema: string): {
120
126
  program?: undefined;
121
127
  aPositionBuffer?: undefined;
128
+ } | {
129
+ program: WebGLProgram;
130
+ aPositionBuffer: WebGLBuffer | null;
122
131
  };
123
- bindParticle(gl: WebGLRenderingContext, drawVert: string, drawFrag: string, quadVert: string, screenFrag: string, updateFrag: string): {
132
+ bindParticle(gl: GLContext, drawVert: string, drawFrag: string, quadVert: string, screenFrag: string, updateFrag: string): {
124
133
  particle: {
125
134
  program: WebGLProgram;
126
135
  } | undefined;
@@ -132,31 +141,45 @@ export declare class WebGL {
132
141
  } | undefined;
133
142
  quadBuffer: WebGLBuffer | null;
134
143
  frameBuffer: WebGLFramebuffer | null;
144
+ vertexArray: WebGLVertexArrayObject | null;
135
145
  };
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;
146
+ draw(viewport: Viewport, context: GLContext | null, program: WebGLProgram | null, texture: WebGLTexture | null, colorTexture: WebGLTexture | null, aPositionBuffer: WebGLBuffer | null, options?: ParticleOptions): void;
147
+ drawParticle(viewport: Viewport, gl: GLContext, factorTexture: WebGLTexture, wrapper: any, options: ParticleOptions, deltaSeconds?: number): void;
138
148
  private renderScreen;
139
149
  private renderScreenTexture;
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
- };
150
+ renderParticles(viewport: Viewport, gl: GLContext, wrapper: any, options: ParticleOptions): void;
151
+ updateParticles(viewport: Viewport, gl: GLContext, wrapper: any, options: ParticleOptions, deltaSeconds?: number): void;
152
+ resize(viewport: Viewport, gl: GLContext, previous?: any): any;
153
+ destroyParticle(gl: GLContext | undefined, wrapper: any): void;
146
154
  loadImg(data: any): Promise<HTMLImageElement>;
147
155
  }
148
156
  /**
149
157
  * WebGL (GLSL)渲染语法
150
158
  */
151
159
  export declare class WebGLSchema {
160
+ static toWebGL2(source: string, stage: 'vertex' | 'fragment'): string;
152
161
  static vertexSchema: string;
153
162
  static uvFragmentSchema: string;
163
+ static sigWaveFragmentSchema: string;
154
164
  static fragmentSchema: string;
155
165
  }
156
166
  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;
157
171
  static vertexSchema: string;
158
172
  static fragmentSchema: string;
159
173
  static quadVertSchema: string;
160
174
  static screenFragmentSchema: string;
161
175
  static updateFragmentSchema: string;
162
176
  }
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-b4e893f0.js";
2
- import "./chunk-3VYIPD3A-a7689b18.js";
3
- import "./index-d1d43372.js";
1
+ import { d as l } from "./chunk-ANSXOGKI-b8cbbf9b.js";
2
+ import "./chunk-3VYIPD3A-95990159.js";
3
+ import "./index-05c9c8c3.js";
4
4
  import "axios";
5
5
  import "vuetify";
6
6
  import "vue";