bluestar-maplibre 1.0.24
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/blue-star/maplibre/src/bluestar.d.ts +312 -0
- package/dist/blue-star/maplibre/src/components/imageRender/imageRender.d.ts +239 -0
- package/dist/blue-star/maplibre/src/components/render.d.ts +47 -0
- package/dist/blue-star/maplibre/src/components/wegRender/lib/defaultConfig.d.ts +198 -0
- package/dist/blue-star/maplibre/src/components/wegRender/lib/index.d.ts +10 -0
- package/dist/blue-star/maplibre/src/components/wegRender/lib/layerManager.d.ts +100 -0
- package/dist/blue-star/maplibre/src/components/wegRender/lib/propertyController.d.ts +165 -0
- package/dist/blue-star/maplibre/src/components/wegRender/lib/types.d.ts +120 -0
- package/dist/blue-star/maplibre/src/components/wegRender/wegRender.d.ts +471 -0
- package/dist/blue-star/maplibre/src/components/wegRender2/lib/defaultConfig.d.ts +52 -0
- package/dist/blue-star/maplibre/src/components/wegRender2/lib/index.d.ts +3 -0
- package/dist/blue-star/maplibre/src/components/wegRender2/lib/layerManager2.d.ts +65 -0
- package/dist/blue-star/maplibre/src/components/wegRender2/lib/propertyController2.d.ts +23 -0
- package/dist/blue-star/maplibre/src/components/wegRender2/lib/types.d.ts +199 -0
- package/dist/blue-star/maplibre/src/components/wegRender2/wegRender2.d.ts +95 -0
- package/dist/blue-star/maplibre/src/index.d.ts +102 -0
- package/dist/blue-star/maplibre/src/interface/dataType.d.ts +36 -0
- package/dist/blue-star/maplibre/src/interface/position.d.ts +102 -0
- package/dist/blue-star/maplibre/src/map.d.ts +65 -0
- package/dist/blue-star/maplibre/src/style.json.d.ts +23 -0
- package/dist/blue-star/maplibre/src/util/DOMControlTool.d.ts +165 -0
- package/dist/blue-star/maplibre/src/util/WegRGBImage.d.ts +88 -0
- package/dist/blue-star/maplibre/src/util/createColorRamp.d.ts +72 -0
- package/dist/blue-star/maplibre/src/vue/bubble-manager.vue.d.ts +34 -0
- package/dist/blue-star/maplibre/src/vue/bubble.vue.d.ts +39 -0
- package/dist/blue-star/maplibre/src/vue/component.d.ts +296 -0
- package/dist/blue-star/maplibre/src/vue/hook.d.ts +84 -0
- package/dist/blue-star/maplibre/src/vue/tool/components/render/components/color-bar/components/color-bar-edit/lib/color-presets.d.ts +8 -0
- package/dist/blue-star/maplibre/src/xmap/xmap.d.ts +575 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4632 -0
- package/dist/style.css +1 -0
- package/dist/types/types.d.ts +9 -0
- package/package.json +13 -0
- package/readme.md +69 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { ColorRampItem } from '../../../interface/dataType';
|
|
2
|
+
/**
|
|
3
|
+
* 默认风级配置
|
|
4
|
+
*/
|
|
5
|
+
export declare const DEFAULT_LEVEL: number[];
|
|
6
|
+
/**
|
|
7
|
+
* 默认颜色渐变配置
|
|
8
|
+
*/
|
|
9
|
+
export declare const DEFAULT_COLOR_RAMP: ColorRampItem[];
|
|
10
|
+
/**
|
|
11
|
+
* 默认雪碧图配置
|
|
12
|
+
*/
|
|
13
|
+
export declare const DEFAULT_SPRITE_IMAGE: {
|
|
14
|
+
url: string;
|
|
15
|
+
column: number;
|
|
16
|
+
row: number;
|
|
17
|
+
scale: number;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* 热力图图层默认配置
|
|
21
|
+
*/
|
|
22
|
+
export declare const HEATMAP_DEFAULT_CONFIG: {
|
|
23
|
+
/** 数据过滤方式:'linear' | 'nearest' */
|
|
24
|
+
dataFilter: "nearest";
|
|
25
|
+
/** 透明度 */
|
|
26
|
+
opacity: number;
|
|
27
|
+
/** 高程偏移 */
|
|
28
|
+
elevation: number;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* 文本图层默认配置
|
|
32
|
+
*/
|
|
33
|
+
export declare const TEXT_LAYER_DEFAULT_CONFIG: {
|
|
34
|
+
/** 网格单元大小(密度) */
|
|
35
|
+
cell: number;
|
|
36
|
+
/** 字体大小 */
|
|
37
|
+
fontSize: number;
|
|
38
|
+
/** 字体族 */
|
|
39
|
+
fontFamily: string;
|
|
40
|
+
/** 文字对齐方式 */
|
|
41
|
+
align: CanvasTextAlign;
|
|
42
|
+
/** 默认颜色函数 */
|
|
43
|
+
defaultColor: string;
|
|
44
|
+
/** 默认数值格式化函数 */
|
|
45
|
+
defaultFormat: (value: number) => string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* 等值线图层默认配置
|
|
49
|
+
*/
|
|
50
|
+
export declare const ISOLINE_DEFAULT_CONFIG: {
|
|
51
|
+
/** 等值线数值区间 */
|
|
52
|
+
interval: number[];
|
|
53
|
+
/** 偏移量 */
|
|
54
|
+
offset: number;
|
|
55
|
+
/** 张力 */
|
|
56
|
+
tension: number;
|
|
57
|
+
/** 线条宽度 */
|
|
58
|
+
width: number;
|
|
59
|
+
/** 线条颜色 */
|
|
60
|
+
color: string;
|
|
61
|
+
/** 线条样式 */
|
|
62
|
+
dash: "solid";
|
|
63
|
+
/** 标签配置 */
|
|
64
|
+
label: {
|
|
65
|
+
/** 是否启用标签 */
|
|
66
|
+
enable: boolean;
|
|
67
|
+
/** 字体大小 */
|
|
68
|
+
fontSize: number;
|
|
69
|
+
/** 字体族 */
|
|
70
|
+
fontFamily: string;
|
|
71
|
+
/** 标签颜色 */
|
|
72
|
+
color: string;
|
|
73
|
+
/** 内边距 */
|
|
74
|
+
padding: number;
|
|
75
|
+
/** 背景颜色 */
|
|
76
|
+
background: string;
|
|
77
|
+
/** 默认格式化函数 */
|
|
78
|
+
defaultFormat: (val: number) => string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* 向量图层默认配置
|
|
83
|
+
*/
|
|
84
|
+
export declare const VECTOR_LAYER_DEFAULT_CONFIG: {
|
|
85
|
+
/** 矢量类型 */
|
|
86
|
+
type: "dv";
|
|
87
|
+
/** 风级配置 */
|
|
88
|
+
level: number[];
|
|
89
|
+
/** 雪碧图配置 */
|
|
90
|
+
image: {
|
|
91
|
+
count: [number, number];
|
|
92
|
+
scale: number;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* 粒子图层默认配置
|
|
97
|
+
*/
|
|
98
|
+
export declare const PARTICLE_LAYER_DEFAULT_CONFIG: {
|
|
99
|
+
/** 粒子大小 */
|
|
100
|
+
size: number;
|
|
101
|
+
/** 粒子速度 */
|
|
102
|
+
speed: number;
|
|
103
|
+
/** 消失速度 */
|
|
104
|
+
disappear: number;
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* 全局默认配置集合
|
|
108
|
+
*/
|
|
109
|
+
export declare const WEG_DEFAULT_CONFIG: {
|
|
110
|
+
/** 风级配置 */
|
|
111
|
+
readonly level: number[];
|
|
112
|
+
/** 颜色渐变 */
|
|
113
|
+
readonly colorRamp: ColorRampItem[];
|
|
114
|
+
/** 雪碧图 */
|
|
115
|
+
readonly spriteImage: {
|
|
116
|
+
url: string;
|
|
117
|
+
column: number;
|
|
118
|
+
row: number;
|
|
119
|
+
scale: number;
|
|
120
|
+
};
|
|
121
|
+
/** 热力图配置 */
|
|
122
|
+
readonly heatmap: {
|
|
123
|
+
/** 数据过滤方式:'linear' | 'nearest' */
|
|
124
|
+
dataFilter: "nearest";
|
|
125
|
+
/** 透明度 */
|
|
126
|
+
opacity: number;
|
|
127
|
+
/** 高程偏移 */
|
|
128
|
+
elevation: number;
|
|
129
|
+
};
|
|
130
|
+
/** 文本图层配置 */
|
|
131
|
+
readonly textLayer: {
|
|
132
|
+
/** 网格单元大小(密度) */
|
|
133
|
+
cell: number;
|
|
134
|
+
/** 字体大小 */
|
|
135
|
+
fontSize: number;
|
|
136
|
+
/** 字体族 */
|
|
137
|
+
fontFamily: string;
|
|
138
|
+
/** 文字对齐方式 */
|
|
139
|
+
align: CanvasTextAlign;
|
|
140
|
+
/** 默认颜色函数 */
|
|
141
|
+
defaultColor: string;
|
|
142
|
+
/** 默认数值格式化函数 */
|
|
143
|
+
defaultFormat: (value: number) => string;
|
|
144
|
+
};
|
|
145
|
+
/** 等值线图层配置 */
|
|
146
|
+
readonly isoline: {
|
|
147
|
+
/** 等值线数值区间 */
|
|
148
|
+
interval: number[];
|
|
149
|
+
/** 偏移量 */
|
|
150
|
+
offset: number;
|
|
151
|
+
/** 张力 */
|
|
152
|
+
tension: number;
|
|
153
|
+
/** 线条宽度 */
|
|
154
|
+
width: number;
|
|
155
|
+
/** 线条颜色 */
|
|
156
|
+
color: string;
|
|
157
|
+
/** 线条样式 */
|
|
158
|
+
dash: "solid";
|
|
159
|
+
/** 标签配置 */
|
|
160
|
+
label: {
|
|
161
|
+
/** 是否启用标签 */
|
|
162
|
+
enable: boolean;
|
|
163
|
+
/** 字体大小 */
|
|
164
|
+
fontSize: number;
|
|
165
|
+
/** 字体族 */
|
|
166
|
+
fontFamily: string;
|
|
167
|
+
/** 标签颜色 */
|
|
168
|
+
color: string;
|
|
169
|
+
/** 内边距 */
|
|
170
|
+
padding: number;
|
|
171
|
+
/** 背景颜色 */
|
|
172
|
+
background: string;
|
|
173
|
+
/** 默认格式化函数 */
|
|
174
|
+
defaultFormat: (val: number) => string;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
/** 向量图层配置 */
|
|
178
|
+
readonly vector: {
|
|
179
|
+
/** 矢量类型 */
|
|
180
|
+
type: "dv";
|
|
181
|
+
/** 风级配置 */
|
|
182
|
+
level: number[];
|
|
183
|
+
/** 雪碧图配置 */
|
|
184
|
+
image: {
|
|
185
|
+
count: [number, number];
|
|
186
|
+
scale: number;
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
/** 粒子图层配置 */
|
|
190
|
+
readonly particle: {
|
|
191
|
+
/** 粒子大小 */
|
|
192
|
+
size: number;
|
|
193
|
+
/** 粒子速度 */
|
|
194
|
+
speed: number;
|
|
195
|
+
/** 消失速度 */
|
|
196
|
+
disappear: number;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module WegRenderLib Weg 渲染库模块
|
|
3
|
+
* @description 导出 Weg 渲染相关的所有类型和类
|
|
4
|
+
*/
|
|
5
|
+
export type { WegRenderOption, SpringImage } from './types';
|
|
6
|
+
export { WEG_DEFAULT_CONFIG, DEFAULT_LEVEL, DEFAULT_COLOR_RAMP, DEFAULT_SPRITE_IMAGE, HEATMAP_DEFAULT_CONFIG, TEXT_LAYER_DEFAULT_CONFIG, ISOLINE_DEFAULT_CONFIG, VECTOR_LAYER_DEFAULT_CONFIG, PARTICLE_LAYER_DEFAULT_CONFIG } from './defaultConfig';
|
|
7
|
+
export { WegLayerManager } from './layerManager';
|
|
8
|
+
export type { LayerManager } from './layerManager';
|
|
9
|
+
export { WegPropertyController } from './propertyController';
|
|
10
|
+
export type { PropertyController } from './propertyController';
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { BlueStar } from '../../../bluestar';
|
|
2
|
+
import { WegFile } from 'bluestar-util';
|
|
3
|
+
import { HeatmapLayer, IsolineLayer, ParticleLayer, TextLayer, VectorLayer } from '../../../xmap/xmap';
|
|
4
|
+
import { WegRenderOption } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* 图层管理器接口
|
|
7
|
+
*/
|
|
8
|
+
export interface LayerManager {
|
|
9
|
+
/** 热力图图层 ID */
|
|
10
|
+
colorMapId: string;
|
|
11
|
+
/** 文本图层 ID */
|
|
12
|
+
gridValueId: string;
|
|
13
|
+
/** 等值线图层 ID */
|
|
14
|
+
contourLayerId: string;
|
|
15
|
+
/** 向量图层 ID */
|
|
16
|
+
vectorLayerId: string;
|
|
17
|
+
/** 粒子图层 ID */
|
|
18
|
+
particleLayerId: string;
|
|
19
|
+
/** 值与方向数据源 ID */
|
|
20
|
+
valueDirectionSourceId: string;
|
|
21
|
+
/** 创建所有图层 */
|
|
22
|
+
createLayers(weg: WegFile, config: WegRenderOption): void;
|
|
23
|
+
/** 销毁所有图层 */
|
|
24
|
+
destroy(): void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Weg 图层管理器类
|
|
28
|
+
*/
|
|
29
|
+
export declare class WegLayerManager implements LayerManager {
|
|
30
|
+
private bluestar;
|
|
31
|
+
private viewer;
|
|
32
|
+
private config;
|
|
33
|
+
/** 主数据源 ID */
|
|
34
|
+
sourceId: string;
|
|
35
|
+
/** 热力图图层 ID */
|
|
36
|
+
colorMapId: string;
|
|
37
|
+
/** 文本图层 ID */
|
|
38
|
+
gridValueId: string;
|
|
39
|
+
/** 等值线图层 ID */
|
|
40
|
+
contourLayerId: string;
|
|
41
|
+
/** 向量图层 ID */
|
|
42
|
+
vectorLayerId: string;
|
|
43
|
+
/** 粒子图层 ID */
|
|
44
|
+
particleLayerId: string;
|
|
45
|
+
/** 值与方向数据源 ID */
|
|
46
|
+
valueDirectionSourceId: string;
|
|
47
|
+
/** 热力图图层实例 */
|
|
48
|
+
colorMapLayer?: HeatmapLayer;
|
|
49
|
+
/** 文本图层实例 */
|
|
50
|
+
gridValueLayer?: TextLayer;
|
|
51
|
+
/** 等值线图层实例 */
|
|
52
|
+
contourLayer?: IsolineLayer;
|
|
53
|
+
/** 向量图层实例 */
|
|
54
|
+
vectorLayer?: VectorLayer;
|
|
55
|
+
/** 粒子图层实例 */
|
|
56
|
+
particleLayer?: ParticleLayer;
|
|
57
|
+
/** 值与方向数据源 */
|
|
58
|
+
valueDirectionSource: any;
|
|
59
|
+
constructor(bluestar: BlueStar, config: WegRenderOption);
|
|
60
|
+
/**
|
|
61
|
+
* 生成唯一 ID
|
|
62
|
+
*/
|
|
63
|
+
private createId;
|
|
64
|
+
/**
|
|
65
|
+
* 创建所有图层
|
|
66
|
+
*/
|
|
67
|
+
createLayers(weg: WegFile): void;
|
|
68
|
+
/**
|
|
69
|
+
* 创建主数据源
|
|
70
|
+
*/
|
|
71
|
+
private createMainSource;
|
|
72
|
+
/**
|
|
73
|
+
* 创建热力图图层
|
|
74
|
+
*/
|
|
75
|
+
private createColorMapLayer;
|
|
76
|
+
/**
|
|
77
|
+
* 创建文本图层 (网格数值)
|
|
78
|
+
*/
|
|
79
|
+
private createTextLayer;
|
|
80
|
+
/**
|
|
81
|
+
* 创建等值线图层
|
|
82
|
+
*/
|
|
83
|
+
private createContourLayer;
|
|
84
|
+
/**
|
|
85
|
+
* 创建向量和粒子图层
|
|
86
|
+
*/
|
|
87
|
+
private createVectorAndParticleLayers;
|
|
88
|
+
/**
|
|
89
|
+
* 添加所有图层到地图
|
|
90
|
+
*/
|
|
91
|
+
private addLayersToMap;
|
|
92
|
+
/**
|
|
93
|
+
* 应用可见性设置
|
|
94
|
+
*/
|
|
95
|
+
private applyVisibilitySettings;
|
|
96
|
+
/**
|
|
97
|
+
* 销毁所有图层和资源
|
|
98
|
+
*/
|
|
99
|
+
destroy(): void;
|
|
100
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { BlueStar } from '../../../bluestar';
|
|
2
|
+
import { WegFile } from 'bluestar-util';
|
|
3
|
+
import { ColorRampItem } from '../../../interface/dataType';
|
|
4
|
+
import { HeatmapLayer, IsolineLayer, ParticleLayer, TextLayer, VectorLayer } from '../../../xmap/xmap';
|
|
5
|
+
import { WegRenderOption } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* 属性控制器接口
|
|
8
|
+
*/
|
|
9
|
+
export interface PropertyController {
|
|
10
|
+
/** 初始化风级配置 */
|
|
11
|
+
initializeLevel(config: WegRenderOption): void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Weg 属性控制器类
|
|
15
|
+
*/
|
|
16
|
+
export declare class WegPropertyController implements PropertyController {
|
|
17
|
+
private bluestar;
|
|
18
|
+
private viewer;
|
|
19
|
+
private config;
|
|
20
|
+
private _level;
|
|
21
|
+
private colorMapId;
|
|
22
|
+
private gridValueId;
|
|
23
|
+
private contourLayerId;
|
|
24
|
+
private vectorLayerId;
|
|
25
|
+
private particleLayerId;
|
|
26
|
+
private valueDirectionSourceId;
|
|
27
|
+
private sourceId;
|
|
28
|
+
private colorMapLayer?;
|
|
29
|
+
private gridValueLayer?;
|
|
30
|
+
private contourLayer?;
|
|
31
|
+
private vectorLayer?;
|
|
32
|
+
private particleLayer?;
|
|
33
|
+
private valueDirectionSource?;
|
|
34
|
+
constructor(bluestar: BlueStar, config: WegRenderOption, layerRefs: {
|
|
35
|
+
sourceId: string;
|
|
36
|
+
colorMapId: string;
|
|
37
|
+
gridValueId: string;
|
|
38
|
+
contourLayerId: string;
|
|
39
|
+
vectorLayerId: string;
|
|
40
|
+
particleLayerId: string;
|
|
41
|
+
valueDirectionSourceId: string;
|
|
42
|
+
colorMapLayer?: HeatmapLayer;
|
|
43
|
+
gridValueLayer?: TextLayer;
|
|
44
|
+
contourLayer?: IsolineLayer;
|
|
45
|
+
vectorLayer?: VectorLayer;
|
|
46
|
+
particleLayer?: ParticleLayer;
|
|
47
|
+
valueDirectionSource?: any;
|
|
48
|
+
});
|
|
49
|
+
static checkGridValueColor(color: any): ((value: number) => string);
|
|
50
|
+
/**
|
|
51
|
+
* 更新图层引用(在图层创建后调用)
|
|
52
|
+
*/
|
|
53
|
+
updateLayerRefs(layerRefs: {
|
|
54
|
+
colorMapLayer?: HeatmapLayer;
|
|
55
|
+
gridValueLayer?: TextLayer;
|
|
56
|
+
contourLayer?: IsolineLayer;
|
|
57
|
+
vectorLayer?: VectorLayer;
|
|
58
|
+
particleLayer?: ParticleLayer;
|
|
59
|
+
valueDirectionSource?: any;
|
|
60
|
+
}): void;
|
|
61
|
+
/**
|
|
62
|
+
* 初始化风级配置
|
|
63
|
+
*/
|
|
64
|
+
initializeLevel(config: WegRenderOption): void;
|
|
65
|
+
/**
|
|
66
|
+
* 填充效果开关
|
|
67
|
+
*/
|
|
68
|
+
get fillFulling(): boolean;
|
|
69
|
+
set fillFulling(enable: boolean);
|
|
70
|
+
/**
|
|
71
|
+
* 粒子效果开关
|
|
72
|
+
*/
|
|
73
|
+
get particle(): boolean;
|
|
74
|
+
set particle(enable: boolean);
|
|
75
|
+
/**
|
|
76
|
+
* 网格数值显示开关
|
|
77
|
+
*/
|
|
78
|
+
get gridValue(): boolean;
|
|
79
|
+
set gridValue(enable: boolean);
|
|
80
|
+
/**
|
|
81
|
+
* 风级配置
|
|
82
|
+
*/
|
|
83
|
+
get level(): number[];
|
|
84
|
+
set level(level: number[]);
|
|
85
|
+
/**
|
|
86
|
+
* 线性插值开关
|
|
87
|
+
*/
|
|
88
|
+
get linearValue(): boolean;
|
|
89
|
+
set linearValue(enable: boolean);
|
|
90
|
+
/**
|
|
91
|
+
* 等值线数值区间
|
|
92
|
+
*/
|
|
93
|
+
get contour(): number[] | undefined;
|
|
94
|
+
set contour(contour: number[] | undefined | null);
|
|
95
|
+
/**
|
|
96
|
+
* 等值线样式配置
|
|
97
|
+
*/
|
|
98
|
+
get contourStyle(): WegRenderOption['contourStyle'];
|
|
99
|
+
set contourStyle(style: WegRenderOption['contourStyle']);
|
|
100
|
+
/**
|
|
101
|
+
* 等值线标签配置
|
|
102
|
+
*/
|
|
103
|
+
get contourLabel(): WegRenderOption['contourLabel'];
|
|
104
|
+
set contourLabel(label: WegRenderOption['contourLabel']);
|
|
105
|
+
/**
|
|
106
|
+
* 等值线标签显示隐藏控制
|
|
107
|
+
*/
|
|
108
|
+
get contourLabelEnable(): boolean;
|
|
109
|
+
set contourLabelEnable(enable: boolean);
|
|
110
|
+
/**
|
|
111
|
+
* 网格数值颜色
|
|
112
|
+
*/
|
|
113
|
+
get gridValueColor(): ((value: number) => string) | string;
|
|
114
|
+
set gridValueColor(color: ((value: number) => string) | string);
|
|
115
|
+
/**
|
|
116
|
+
* 网格数值字体大小
|
|
117
|
+
*/
|
|
118
|
+
get gridValueFontSize(): number;
|
|
119
|
+
set gridValueFontSize(fontSize: number);
|
|
120
|
+
/**
|
|
121
|
+
* 网格数值字体
|
|
122
|
+
*/
|
|
123
|
+
get gridValueFont(): string;
|
|
124
|
+
set gridValueFont(font: string);
|
|
125
|
+
/**
|
|
126
|
+
* 网格数值格式化函数
|
|
127
|
+
*/
|
|
128
|
+
get gridValueFormat(): (value: number) => string;
|
|
129
|
+
set gridValueFormat(gridValueFormat: (v: number) => string);
|
|
130
|
+
/**
|
|
131
|
+
* 方向箭头颜色
|
|
132
|
+
*/
|
|
133
|
+
get vectorColor(): string;
|
|
134
|
+
set vectorColor(color: string);
|
|
135
|
+
/**
|
|
136
|
+
* 网格单元大小(控制符号密度)
|
|
137
|
+
*/
|
|
138
|
+
get cell(): number;
|
|
139
|
+
set cell(cell: number | undefined);
|
|
140
|
+
/**
|
|
141
|
+
* 透明度配置
|
|
142
|
+
*/
|
|
143
|
+
get alpha(): number;
|
|
144
|
+
set alpha(alpha: number);
|
|
145
|
+
/**
|
|
146
|
+
* 设置 Weg 数据
|
|
147
|
+
*/
|
|
148
|
+
get wegData(): WegFile | undefined;
|
|
149
|
+
set wegData(weg: WegFile);
|
|
150
|
+
/**
|
|
151
|
+
* 颜色渐变配置
|
|
152
|
+
*/
|
|
153
|
+
get colorRamp(): ColorRampItem[];
|
|
154
|
+
set colorRamp(colorRamp: ColorRampItem[]);
|
|
155
|
+
/**
|
|
156
|
+
* 颜色渐变默认颜色
|
|
157
|
+
*/
|
|
158
|
+
get colorRampDefaultColor(): string | undefined;
|
|
159
|
+
set colorRampDefaultColor(color: string);
|
|
160
|
+
/**
|
|
161
|
+
* 是否启用方向指示
|
|
162
|
+
*/
|
|
163
|
+
get direction(): boolean;
|
|
164
|
+
set direction(enable: boolean);
|
|
165
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { ColorRampItem } from '../../../interface/dataType';
|
|
2
|
+
/**
|
|
3
|
+
* 雪碧图接口定义
|
|
4
|
+
*/
|
|
5
|
+
export type SpringImage = {
|
|
6
|
+
/** 图片资源路径 */
|
|
7
|
+
url: string;
|
|
8
|
+
/** 图片规格(纵几列图片) */
|
|
9
|
+
column: number;
|
|
10
|
+
/** 图片规格(横几行图片) */
|
|
11
|
+
row: number;
|
|
12
|
+
/** 缩放比例 */
|
|
13
|
+
scale: number;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Weg 渲染选项配置对象类型定义
|
|
17
|
+
*/
|
|
18
|
+
export type WegRenderOption = {
|
|
19
|
+
/** 设置渲染器名称 */
|
|
20
|
+
name?: string;
|
|
21
|
+
/** 颜色渐变条配置项数组 */
|
|
22
|
+
colorRamp: ColorRampItem[];
|
|
23
|
+
/** 默认颜色,默认 "#0aa1ed" */
|
|
24
|
+
colorRampDefaultColor?: string;
|
|
25
|
+
/** 等值线数值数组,默认为空 */
|
|
26
|
+
contour?: number[];
|
|
27
|
+
/** 等值线样式配置 */
|
|
28
|
+
contourStyle?: {
|
|
29
|
+
/** 线条宽度,默认 1 */
|
|
30
|
+
width?: number;
|
|
31
|
+
/** 线条颜色,默认 "#fff" */
|
|
32
|
+
color?: string;
|
|
33
|
+
/** 虚线样式,默认 'solid' */
|
|
34
|
+
dash?: 'solid' | 'dashed' | 'dotted' | number[];
|
|
35
|
+
/** 线条平滑度, 默认1 */
|
|
36
|
+
tension?: number;
|
|
37
|
+
/** 线条样式,默认 'solid' */
|
|
38
|
+
cell?: number;
|
|
39
|
+
};
|
|
40
|
+
/** 等值线标签配置 */
|
|
41
|
+
contourLabel?: {
|
|
42
|
+
/** 是否显示标签,默认 true */
|
|
43
|
+
enable?: boolean;
|
|
44
|
+
/** 字体大小,默认 24 */
|
|
45
|
+
fontSize?: number;
|
|
46
|
+
/** 字体颜色,默认 "#fff" */
|
|
47
|
+
color?: string;
|
|
48
|
+
/** 字体族,默认 "Arial, sans-serif" */
|
|
49
|
+
font?: string;
|
|
50
|
+
/** 文字内边距,默认 4 */
|
|
51
|
+
padding?: number;
|
|
52
|
+
/** 背景颜色,默认透明 */
|
|
53
|
+
background?: string;
|
|
54
|
+
/** 数值格式化函数 */
|
|
55
|
+
format?: (value: number) => string;
|
|
56
|
+
};
|
|
57
|
+
level?: number[];
|
|
58
|
+
/** 是否开启填充,默认 false */
|
|
59
|
+
fillFulling?: boolean;
|
|
60
|
+
/** 是否对数值进行线性插值,默认 false */
|
|
61
|
+
linearValue?: boolean;
|
|
62
|
+
/** 是否显示网格数值,默认 false */
|
|
63
|
+
gridValue?: boolean;
|
|
64
|
+
/** 网格数值样式配置 */
|
|
65
|
+
gridValueStyle?: {
|
|
66
|
+
/** 文字颜色,
|
|
67
|
+
* 1. 颜色字符串
|
|
68
|
+
* 2. (value: number) => string 类型的简单函数
|
|
69
|
+
* 3. 可以被new Function() 创建的函数字符串(仅接收value一个参数),用于根据数值返回颜色
|
|
70
|
+
* */
|
|
71
|
+
color?: ((value: number) => string) | string;
|
|
72
|
+
/** 字体大小,默认 24 */
|
|
73
|
+
fontSize?: number;
|
|
74
|
+
/** 字体族,默认 "Arial, sans-serif" */
|
|
75
|
+
font?: string;
|
|
76
|
+
/** 文字对齐方式,默认 "center" */
|
|
77
|
+
align?: CanvasTextAlign;
|
|
78
|
+
};
|
|
79
|
+
/** 是否显示方向指示,默认 false */
|
|
80
|
+
direction?: boolean;
|
|
81
|
+
/** 方向指示颜色,默认 "#0aa1ed" */
|
|
82
|
+
vectorColor?: string;
|
|
83
|
+
/** 网格单元大小,控制数值风杆的密度 */
|
|
84
|
+
cell?: number;
|
|
85
|
+
/** 方向指示图片,默认使用 sketch_wind@64.png */
|
|
86
|
+
vectorImage?: SpringImage;
|
|
87
|
+
/** 粒子效果配置项 */
|
|
88
|
+
/** 是否显示粒子 default false */
|
|
89
|
+
particle?: boolean;
|
|
90
|
+
particleConfig?: {
|
|
91
|
+
/** 是否显示粒子尺寸 default 2*/
|
|
92
|
+
size?: number;
|
|
93
|
+
/** 粒子运动速度 default 0.3*/
|
|
94
|
+
speed?: number;
|
|
95
|
+
/** 粒子消失速度 default 1*/
|
|
96
|
+
disappear?: number;
|
|
97
|
+
/** 粒子颜色 */
|
|
98
|
+
colorRamp?: ColorRampItem[];
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* @deprecated 请配置 particleConfig 替代
|
|
102
|
+
*/
|
|
103
|
+
particleSize?: number;
|
|
104
|
+
/**
|
|
105
|
+
* @deprecated 请配置 particleConfig 替代
|
|
106
|
+
*/
|
|
107
|
+
particleSpeed?: number;
|
|
108
|
+
/**
|
|
109
|
+
* @deprecated 请配置 particleConfig 替代
|
|
110
|
+
*/
|
|
111
|
+
particleDisappear?: number;
|
|
112
|
+
/**
|
|
113
|
+
* @deprecated 请配置 particleConfig 替代
|
|
114
|
+
*/
|
|
115
|
+
particleColorRamp?: ColorRampItem[];
|
|
116
|
+
/** 网格数值格式化函数,默认保留一位小数 */
|
|
117
|
+
gridValueFormat?: (value: number) => string;
|
|
118
|
+
/** 透明度,默认 0.8 */
|
|
119
|
+
alpha?: number;
|
|
120
|
+
};
|