@metagl/smartearth-base 0.2.0 → 0.3.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.md +47 -0
- package/README.md +129 -5
- package/dist/chunk-6U32ENXU.js +736 -0
- package/dist/{chunk-O7CP7PJG.js → chunk-JGNKH4TR.js} +342 -88
- package/dist/chunk-XJRW7VZC.js +885 -0
- package/dist/createEarth-BY0dtgQQ.d.ts +647 -0
- package/dist/errors-cB7IQlHy.d.ts +15 -0
- package/dist/index.d.ts +44 -8
- package/dist/index.js +2 -1
- package/dist/presets.d.ts +311 -0
- package/dist/presets.js +2 -0
- package/dist/vue.d.ts +79 -3
- package/dist/vue.js +240 -3
- package/package.json +75 -70
- package/dist/errors-CtkYU3iT.d.ts +0 -267
|
@@ -0,0 +1,647 @@
|
|
|
1
|
+
import * as CesiumNS from 'cesium';
|
|
2
|
+
import { Cartesian3, Viewer, Entity } from 'cesium';
|
|
3
|
+
import { DirectionalLightConfig, ShadowConfig, VolumetricCloudsConfig, DistanceFogConfig, HeightFogConfig, AtmosphereScatteringConfig, SSRConfig, SSGIConfig, HBAOConfig, SSRTConfig, PostProcessingConfig, RiverWaterConfig, WaterConfig, CameraListenerSystemConfig, Render } from '@metagl/sdk-render';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* sdk-render 4.x 的模型材质(PBR)参数。字段与范围以 SDK 为准(SDK 会钳制越界值、丢弃未知字段):
|
|
7
|
+
* diffuseStrength 0~4 · emissiveStrength 0~8 · specularStrength 0~4 · roughnessOffset -1~1 ·
|
|
8
|
+
* aoStrength 0~4 · iblDiffuse / iblSpecular / luminance 0~1 · iblNightFactor 0~1 · emissiveNightGate ·
|
|
9
|
+
* proceduralWindows。与 @metagl/sdk-render 4.0.0 的 TilesetMaterialParams 对齐。
|
|
10
|
+
*/
|
|
11
|
+
interface PbrMaterialParams {
|
|
12
|
+
readonly diffuseStrength?: number;
|
|
13
|
+
readonly emissiveStrength?: number;
|
|
14
|
+
readonly specularStrength?: number;
|
|
15
|
+
readonly roughnessOffset?: number;
|
|
16
|
+
readonly aoStrength?: number;
|
|
17
|
+
readonly iblDiffuse?: number;
|
|
18
|
+
readonly iblSpecular?: number;
|
|
19
|
+
readonly luminance?: number;
|
|
20
|
+
/** 夜间环境光(IBL)倍率 0~1:满夜时 IBL × 该值,白天不变(4.0.0 全局默认 0.25)。 */
|
|
21
|
+
readonly iblNightFactor?: number;
|
|
22
|
+
/** true = 自发光白天灭、入夜亮(城市窗灯),默认 true。 */
|
|
23
|
+
readonly emissiveNightGate?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* 程序化夜间窗灯:只作用于没有自发光材质的 3DTiles(如城市白模),入夜按窗格错峰点亮;
|
|
26
|
+
* 有自发光贴图的模型与 GLB 不受影响。默认 false,按需开启。
|
|
27
|
+
*/
|
|
28
|
+
readonly proceduralWindows?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/** 全局 PBR 参数(作用于 GLB 模型与纳管的 3DTiles),比单个 tileset 多一个 anisotropy。 */
|
|
31
|
+
interface PbrGlobalParams extends PbrMaterialParams {
|
|
32
|
+
/** 各向异性过滤 1~16。 */
|
|
33
|
+
readonly anisotropy?: number;
|
|
34
|
+
}
|
|
35
|
+
/** 'material' 系统配置,导入导出同形;tileset 以去掉查询串的 URL 为键,不含令牌。 */
|
|
36
|
+
interface PbrConfig {
|
|
37
|
+
readonly pbr?: PbrGlobalParams;
|
|
38
|
+
/** 是否自动给场景里没有 customShader 的 3DTiles 挂共享 PBR(4.0.0 默认 true)。 */
|
|
39
|
+
readonly autoManageTilesets?: boolean;
|
|
40
|
+
readonly tilesets?: Readonly<Record<string, PbrMaterialParams>>;
|
|
41
|
+
}
|
|
42
|
+
/** tileset 实例,或其 URL(尚未加载的会在加载后自动应用)。 */
|
|
43
|
+
type PbrTarget = object | string;
|
|
44
|
+
interface EarthPbr {
|
|
45
|
+
/** 给一个 3DTiles 设单独材质;返回该 tileset 的键(URL 去查询串)。 */
|
|
46
|
+
setTilesetMaterial(target: PbrTarget, params: PbrMaterialParams): string | null;
|
|
47
|
+
getTilesetMaterial(target: PbrTarget): PbrMaterialParams | null;
|
|
48
|
+
/** 清除单独材质,还原 tileset 原有 shader。 */
|
|
49
|
+
clearTilesetMaterial(target: PbrTarget): void;
|
|
50
|
+
/** 读全局 PBR 参数。 */
|
|
51
|
+
getGlobal(): PbrGlobalParams;
|
|
52
|
+
/** 改全局 PBR 参数(只改给出的字段)。 */
|
|
53
|
+
setGlobal(params: PbrGlobalParams): void;
|
|
54
|
+
/** 导出 'material' 配置(可 JSON 序列化)。 */
|
|
55
|
+
exportConfig(): PbrConfig;
|
|
56
|
+
/** 导入 'material' 配置。 */
|
|
57
|
+
importConfig(config: PbrConfig): void;
|
|
58
|
+
/**
|
|
59
|
+
* 是否自动给场景里没有 customShader 的 3D Tiles 挂共享 PBR(默认 true)。
|
|
60
|
+
* 只影响之后加载的 3D Tiles;已经挂上的不会摘掉。
|
|
61
|
+
*/
|
|
62
|
+
setAutoManageTilesets(on: boolean): void;
|
|
63
|
+
getAutoManageTilesets(): boolean;
|
|
64
|
+
/** 全局 PBR 回到建地球时的值(面板「恢复默认材质」);单套 3D Tiles 的单独材质不动。 */
|
|
65
|
+
resetGlobal(): void;
|
|
66
|
+
}
|
|
67
|
+
/** 本包用到的 4.x Render 材质能力子集。 */
|
|
68
|
+
interface MaterialCapableRender {
|
|
69
|
+
setTilesetMaterial(target: unknown, params: PbrMaterialParams): string | null;
|
|
70
|
+
getTilesetMaterial(target: unknown): PbrMaterialParams | null;
|
|
71
|
+
clearTilesetMaterial(target: unknown): void;
|
|
72
|
+
updateSystemConfig(systemName: string, config: unknown): void;
|
|
73
|
+
getSystemConfig(systemName: string): unknown;
|
|
74
|
+
}
|
|
75
|
+
declare function supportsPbr(render: unknown): render is MaterialCapableRender;
|
|
76
|
+
/**
|
|
77
|
+
* sdk-render 有材质接口(4.x)时返回 PBR 适配层,否则 undefined。
|
|
78
|
+
* 只做透传与参数形状校验,数值钳制交给 SDK。
|
|
79
|
+
*/
|
|
80
|
+
declare function createEarthPbr(render: unknown): EarthPbr | undefined;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* 地形挖坑(sdk-render 'water' 系统的地形调整)全局参数,对应面板「河道水面」页的地形调整部分。
|
|
84
|
+
* 挖哪里由 riverWater 图层的 dig 决定;这里调的是挖坑效果本身。
|
|
85
|
+
*/
|
|
86
|
+
interface TerrainAdjustOptions {
|
|
87
|
+
/** 挖坑效果开关(面板「效果开关 / 暂停」):关掉后地形还原、区域保留。 */
|
|
88
|
+
readonly enabled?: boolean;
|
|
89
|
+
/** 显示已应用区域的青色示意面与标签(面板「已应用示意」)。 */
|
|
90
|
+
readonly showAppliedViz?: boolean;
|
|
91
|
+
/** 地形精度(屏幕空间误差,越小越精细,面板 0.25~2)。 */
|
|
92
|
+
readonly precision?: number;
|
|
93
|
+
/** 迟滞缓冲瓦片数(面板 0~6),不要超过 SDK 的瓦片半径 6。 */
|
|
94
|
+
readonly hysteresisTiles?: number;
|
|
95
|
+
/** 三角化(复杂多边形用约束 Delaunay,面板「三角化(fallback)」)。 */
|
|
96
|
+
readonly triangulate?: boolean;
|
|
97
|
+
/** 坑边外扩米数(面板「坡道」)。 */
|
|
98
|
+
readonly expandMeters?: number;
|
|
99
|
+
/** 顶点间距(米)。 */
|
|
100
|
+
readonly vertexSpacing?: number;
|
|
101
|
+
/** 塌陷方案:true = Shader 方案,false = FTP(CPU 改瓦片,默认)。 */
|
|
102
|
+
readonly shaderMode?: boolean;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** 有独立 sdk-render 系统、整体开关的效果 → 系统名。 */
|
|
106
|
+
declare const EFFECT_SYSTEMS: {
|
|
107
|
+
/** 光照系统整体(面板「光照」里的「关闭光照」)。 */
|
|
108
|
+
readonly lighting: "lighting";
|
|
109
|
+
readonly shadow: "shadow";
|
|
110
|
+
readonly clouds: "volumetricClouds";
|
|
111
|
+
readonly distanceFog: "distanceFog";
|
|
112
|
+
readonly heightFog: "heightFog";
|
|
113
|
+
readonly wind: "wind";
|
|
114
|
+
readonly atmosphere: "atmosphereScattering";
|
|
115
|
+
/** 屏幕空间反射(SSR)。默认强度为 0,开了要调 intensity 才看得出。 */
|
|
116
|
+
readonly reflection: "ssr";
|
|
117
|
+
/** 屏幕空间全局光照(SSGI)。 */
|
|
118
|
+
readonly globalIllumination: "ssgi";
|
|
119
|
+
/** 环境光遮蔽(HBAO)。 */
|
|
120
|
+
readonly ambientOcclusion: "hbao";
|
|
121
|
+
/** 屏幕空间光线追踪:体积光束、颜色溢出、镜面(SSRT)。 */
|
|
122
|
+
readonly lightShafts: "ssrt";
|
|
123
|
+
/** 后处理整体(曝光、调色、泛光、抗锯齿、景深都挂在它上面)。 */
|
|
124
|
+
readonly postProcessing: "postProcessing";
|
|
125
|
+
/** 延迟管线的 G-Buffer:全局光照、环境光遮蔽、光束、反射都依赖它,关掉它这些都会失效。 */
|
|
126
|
+
readonly gBuffer: "gBuffer";
|
|
127
|
+
};
|
|
128
|
+
/** sdk-render 的风(类型没导出,按 d.ts 抄一份):驱动云与高度雾飘动。 */
|
|
129
|
+
interface WindOptions {
|
|
130
|
+
/** 风速(米/秒),默认 44。 */
|
|
131
|
+
readonly speed?: number;
|
|
132
|
+
/** 风向(ECEF,不必归一化),默认 (1, 0, 0)。 */
|
|
133
|
+
readonly direction?: {
|
|
134
|
+
readonly x: number;
|
|
135
|
+
readonly y: number;
|
|
136
|
+
readonly z: number;
|
|
137
|
+
};
|
|
138
|
+
/** 湍流 0~1,默认 0。 */
|
|
139
|
+
readonly turbulence?: number;
|
|
140
|
+
}
|
|
141
|
+
/** Cesium 内置雾(viewer.scene.fog),与 distanceFog 后处理雾互斥。 */
|
|
142
|
+
interface SceneFogOptions {
|
|
143
|
+
/** 雾密度,对应 scene.fog.density。 */
|
|
144
|
+
readonly density?: number;
|
|
145
|
+
/** 高度衰减,对应 scene.fog.heightFalloff。 */
|
|
146
|
+
readonly heightFalloff?: number;
|
|
147
|
+
/** 雾颜色 '#rrggbb'(只写:读回时 Cesium 不提供)。 */
|
|
148
|
+
readonly colorHex?: string;
|
|
149
|
+
}
|
|
150
|
+
declare const POST_FLAGS: {
|
|
151
|
+
readonly bloom: "bloomEnabled";
|
|
152
|
+
readonly hdr: "hdrEnabled";
|
|
153
|
+
readonly fxaa: "fxaaEnabled";
|
|
154
|
+
readonly msaa: "msaaEnabled";
|
|
155
|
+
readonly depthOfField: "dofEnabled";
|
|
156
|
+
/** 后处理里的 Cesium 内置 AO(面板「后处理」页的 AO),与 HBAO(ambientOcclusion)不是一回事。 */
|
|
157
|
+
readonly postAmbientOcclusion: "aoEnabled";
|
|
158
|
+
};
|
|
159
|
+
/** 走 render.applyConfig({ builtinFog }) 的 Cesium 内置雾。 */
|
|
160
|
+
declare const SCENE_FOG = "sceneFog";
|
|
161
|
+
type EnvironmentEffect = keyof typeof EFFECT_SYSTEMS | keyof typeof POST_FLAGS | typeof SCENE_FOG;
|
|
162
|
+
/** 可调参数的对象 → 参数类型(字段与范围以 sdk-render 为准,SDK 会钳制越界值)。 */
|
|
163
|
+
interface EffectOptions {
|
|
164
|
+
lighting: DirectionalLightConfig;
|
|
165
|
+
shadow: ShadowConfig;
|
|
166
|
+
clouds: VolumetricCloudsConfig;
|
|
167
|
+
distanceFog: DistanceFogConfig;
|
|
168
|
+
heightFog: HeightFogConfig;
|
|
169
|
+
atmosphere: AtmosphereScatteringConfig;
|
|
170
|
+
reflection: SSRConfig;
|
|
171
|
+
globalIllumination: SSGIConfig;
|
|
172
|
+
ambientOcclusion: HBAOConfig;
|
|
173
|
+
lightShafts: SSRTConfig;
|
|
174
|
+
/** 后处理:曝光、色调映射、对比度、饱和度、色温、泛光(bloom*)、抗锯齿等。 */
|
|
175
|
+
postProcessing: PostProcessingConfig;
|
|
176
|
+
/** 河道水面外观:深浅水颜色、反射强度、水流速度与方向、浪花、焦散、高光、亮度等(作用于全部 riverWater 图层)。 */
|
|
177
|
+
riverWater: RiverWaterConfig;
|
|
178
|
+
/** 水体(挖坑区等)外观:颜色、波纹频率、振幅、动画速度、高光。 */
|
|
179
|
+
water: WaterConfig;
|
|
180
|
+
/** 风:速度、方向、湍流(影响云与高度雾的飘动)。 */
|
|
181
|
+
wind: WindOptions;
|
|
182
|
+
/** Cesium 内置雾:密度、高度衰减、颜色。 */
|
|
183
|
+
sceneFog: SceneFogOptions;
|
|
184
|
+
/**
|
|
185
|
+
* 建筑材质(全局 PBR,作用于 GLB 模型和纳管的 3D Tiles):漫反射、镜面、粗糙度、自发光、AO、IBL、夜间窗灯等。
|
|
186
|
+
* 与 earth.pbr.setGlobal 同一份;按单套 3D Tiles 调材质用 earth.pbr.setTilesetMaterial。
|
|
187
|
+
*/
|
|
188
|
+
buildingMaterial: PbrGlobalParams;
|
|
189
|
+
/** 地形挖坑效果:开关 / 暂停、示意面、精度、迟滞、三角化、坡道外扩、顶点间距、塌陷方案(这里的 enabled 有效)。 */
|
|
190
|
+
terrainAdjust: TerrainAdjustOptions;
|
|
191
|
+
/**
|
|
192
|
+
* 按相机高度淡入淡出:云、距离雾、高度雾、大气各一段 { minHeight, maxHeight, transitionRange }(米)。
|
|
193
|
+
* 键名用 sdk-render 的系统名:volumetricClouds / distanceFog / heightFog / atmosphereScattering。
|
|
194
|
+
*/
|
|
195
|
+
heightGating: CameraListenerSystemConfig;
|
|
196
|
+
}
|
|
197
|
+
/** 样板间的 6 个调色滤镜(后处理的曝光、对比度、饱和度、色温、色调、锐化)。 */
|
|
198
|
+
declare const COLOR_FILTERS: readonly [{
|
|
199
|
+
readonly id: "standard";
|
|
200
|
+
readonly name: "标准";
|
|
201
|
+
readonly params: {
|
|
202
|
+
readonly exposure: 1.1;
|
|
203
|
+
readonly contrast: 1.04;
|
|
204
|
+
readonly saturation: 1.16;
|
|
205
|
+
readonly temperature: 6700;
|
|
206
|
+
readonly tint: -0.1;
|
|
207
|
+
readonly sharpness: 0.45;
|
|
208
|
+
};
|
|
209
|
+
}, {
|
|
210
|
+
readonly id: "warm";
|
|
211
|
+
readonly name: "暖色调";
|
|
212
|
+
readonly params: {
|
|
213
|
+
readonly exposure: 1.2;
|
|
214
|
+
readonly contrast: 1.06;
|
|
215
|
+
readonly saturation: 1.2;
|
|
216
|
+
readonly temperature: 5000;
|
|
217
|
+
readonly tint: 0.05;
|
|
218
|
+
readonly sharpness: 0.3;
|
|
219
|
+
};
|
|
220
|
+
}, {
|
|
221
|
+
readonly id: "cool";
|
|
222
|
+
readonly name: "冷色调";
|
|
223
|
+
readonly params: {
|
|
224
|
+
readonly exposure: 1.05;
|
|
225
|
+
readonly contrast: 1.08;
|
|
226
|
+
readonly saturation: 1.1;
|
|
227
|
+
readonly temperature: 8500;
|
|
228
|
+
readonly tint: -0.05;
|
|
229
|
+
readonly sharpness: 0.4;
|
|
230
|
+
};
|
|
231
|
+
}, {
|
|
232
|
+
readonly id: "vivid";
|
|
233
|
+
readonly name: "鲜艳";
|
|
234
|
+
readonly params: {
|
|
235
|
+
readonly exposure: 1.15;
|
|
236
|
+
readonly contrast: 1.12;
|
|
237
|
+
readonly saturation: 1.5;
|
|
238
|
+
readonly temperature: 6500;
|
|
239
|
+
readonly tint: 0;
|
|
240
|
+
readonly sharpness: 0.6;
|
|
241
|
+
};
|
|
242
|
+
}, {
|
|
243
|
+
readonly id: "desaturate";
|
|
244
|
+
readonly name: "去色";
|
|
245
|
+
readonly params: {
|
|
246
|
+
readonly exposure: 1.1;
|
|
247
|
+
readonly contrast: 1.1;
|
|
248
|
+
readonly saturation: 0.2;
|
|
249
|
+
readonly temperature: 6700;
|
|
250
|
+
readonly tint: 0;
|
|
251
|
+
readonly sharpness: 0.3;
|
|
252
|
+
};
|
|
253
|
+
}, {
|
|
254
|
+
readonly id: "highcontrast";
|
|
255
|
+
readonly name: "高对比度";
|
|
256
|
+
readonly params: {
|
|
257
|
+
readonly exposure: 1.05;
|
|
258
|
+
readonly contrast: 1.3;
|
|
259
|
+
readonly saturation: 1.1;
|
|
260
|
+
readonly temperature: 6700;
|
|
261
|
+
readonly tint: 0;
|
|
262
|
+
readonly sharpness: 0.7;
|
|
263
|
+
};
|
|
264
|
+
}];
|
|
265
|
+
type ColorFilter = (typeof COLOR_FILTERS)[number]['id'];
|
|
266
|
+
type EffectOptionsTarget = keyof EffectOptions;
|
|
267
|
+
interface EffectApi {
|
|
268
|
+
/** 单独开关某个效果(环境、反射、全局光照、环境光遮蔽、光束、泛光)。 */
|
|
269
|
+
setEffect(effect: EnvironmentEffect, enabled: boolean): void;
|
|
270
|
+
getEffects(): Record<EnvironmentEffect, boolean>;
|
|
271
|
+
/** 读某个效果的参数(深拷贝,改它不影响场景)。 */
|
|
272
|
+
getEffectOptions<K extends EffectOptionsTarget>(target: K): EffectOptions[K];
|
|
273
|
+
/**
|
|
274
|
+
* 改某个效果的参数,只改给出的字段。不开关效果本身(开关用 setEffect)。
|
|
275
|
+
* 改 lighting 的 intensity 时,全局光照强度与光束强度按 SDK 公式一起联动(同样板间拖光照强度)。
|
|
276
|
+
*/
|
|
277
|
+
setEffectOptions<K extends EffectOptionsTarget>(target: K, options: Partial<EffectOptions[K]>): void;
|
|
278
|
+
/** 套用样板间的调色滤镜(标准 / 暖色调 / 冷色调 / 鲜艳 / 去色 / 高对比度)。 */
|
|
279
|
+
applyColorFilter(id: ColorFilter): void;
|
|
280
|
+
readonly colorFilters: typeof COLOR_FILTERS;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/** 面板「光照」页的三种模式:关闭光照 / 方向光控制 / 自动跟随太阳。 */
|
|
284
|
+
type LightingMode = 'off' | 'manual' | 'sun';
|
|
285
|
+
/** 方向光的朝向:太阳所在方位角(0 = 北,90 = 东)与高度角(0 = 地平线,90 = 头顶),单位度。 */
|
|
286
|
+
interface LightDirection {
|
|
287
|
+
readonly azimuth: number;
|
|
288
|
+
readonly elevation: number;
|
|
289
|
+
}
|
|
290
|
+
interface LightingApi {
|
|
291
|
+
/** 切换光照模式:'off' 关闭光照,'manual' 方向光(配合 setLightDirection),'sun' 自动跟随太阳(随场景时间)。 */
|
|
292
|
+
setLightingMode(mode: LightingMode): void;
|
|
293
|
+
getLightingMode(): LightingMode;
|
|
294
|
+
/** 手动指定方向光的方位角 / 高度角(会切到 'manual' 模式)。强度、颜色、环境光用 setEffectOptions('lighting', …)。 */
|
|
295
|
+
setLightDirection(direction: LightDirection): void;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
type Quality = 'high' | 'medium' | 'low';
|
|
299
|
+
/** sdk-render 的环境基线:'environment' = 交付基线(DEMO_ENVIRONMENT_BASELINE),'cinematic' = 电影级。 */
|
|
300
|
+
type EnvironmentBaseline = 'environment' | 'cinematic';
|
|
301
|
+
/** SmartEarth SDK 授权:在线/离线 token,或 licence + RSA 公钥(需本地 sdk-licence 服务)二选一。 */
|
|
302
|
+
type SdkAuth = {
|
|
303
|
+
readonly sdkToken: string;
|
|
304
|
+
} | {
|
|
305
|
+
readonly licence: {
|
|
306
|
+
readonly lic: string;
|
|
307
|
+
readonly rsaPubKey: string;
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
interface CustomBasemap {
|
|
311
|
+
/** 影像瓦片 URL 模板({z}/{x}/{y},可含 {s})。 */
|
|
312
|
+
readonly imageryUrl: string;
|
|
313
|
+
/** 注记瓦片 URL 模板,可省略。 */
|
|
314
|
+
readonly annotationUrl?: string;
|
|
315
|
+
readonly subdomains?: readonly string[];
|
|
316
|
+
readonly maximumLevel?: number;
|
|
317
|
+
}
|
|
318
|
+
interface InitialView {
|
|
319
|
+
readonly lon: number;
|
|
320
|
+
readonly lat: number;
|
|
321
|
+
/** 相机高度(米)。 */
|
|
322
|
+
readonly height: number;
|
|
323
|
+
/** 度,默认 0。 */
|
|
324
|
+
readonly heading?: number;
|
|
325
|
+
/** 度,默认 -90(正俯视)。 */
|
|
326
|
+
readonly pitch?: number;
|
|
327
|
+
}
|
|
328
|
+
interface CreateEarthOptions {
|
|
329
|
+
readonly auth: SdkAuth;
|
|
330
|
+
/** 星图地图令牌;用星图底图或星图地形时必填。到 https://datacloud.geovisearth.com/ 申请。 */
|
|
331
|
+
readonly geovisToken?: string;
|
|
332
|
+
/** 'geovis' = 星图影像 + 注记;也可传自定义瓦片。默认 'geovis'。 */
|
|
333
|
+
readonly basemap?: 'geovis' | CustomBasemap;
|
|
334
|
+
/** 是否加载星图地形,默认 true。 */
|
|
335
|
+
readonly terrain?: boolean;
|
|
336
|
+
/** 初始画质,默认 'high'。 */
|
|
337
|
+
readonly quality?: Quality;
|
|
338
|
+
/** smartEarthAssets() 拷出来的资源根路径(sdk-render assets/resources 所在处),默认 '/'。 */
|
|
339
|
+
readonly assetsBasePath?: string;
|
|
340
|
+
/** 初始视角,默认中国全景。 */
|
|
341
|
+
readonly initialView?: InitialView;
|
|
342
|
+
/** 初始化前探测静态资源是否就位,默认 true。 */
|
|
343
|
+
readonly checkAssets?: boolean;
|
|
344
|
+
/** 环境基线,默认 'environment'(sdk-render 交付基线)。 */
|
|
345
|
+
readonly baseline?: EnvironmentBaseline;
|
|
346
|
+
/** 建好后要开 / 关的效果,如 { reflection: true, bloom: true };需要 sdk-render 4.x。 */
|
|
347
|
+
readonly effects?: Partial<Record<EnvironmentEffect, boolean>>;
|
|
348
|
+
/** 建好后显示 sdk-render 自带的环境控制面板(调参用),默认 false;需要 4.x。 */
|
|
349
|
+
readonly showPanel?: boolean;
|
|
350
|
+
/**
|
|
351
|
+
* 项目预设文件(智作「环境预设」卡冻结进工程的 smartearth-preset/1 文档)。默认读
|
|
352
|
+
* `{assetsBasePath}environment/preset.json`:有就套用(环境 + 时间),没有就用交付基线;false 关掉,也可给别的地址。
|
|
353
|
+
*/
|
|
354
|
+
readonly presetFile?: false | string;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/** 环境快照里的相机视角(度、米)。 */
|
|
358
|
+
interface CameraPose {
|
|
359
|
+
readonly lon: number;
|
|
360
|
+
readonly lat: number;
|
|
361
|
+
readonly height: number;
|
|
362
|
+
readonly heading: number;
|
|
363
|
+
readonly pitch: number;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* 环境快照:底座与预设之间唯一的交换格式。
|
|
367
|
+
* environment 是 sdk-render 的整份配置(纯 JSON,基准值,不含画质档位的覆盖)。
|
|
368
|
+
*/
|
|
369
|
+
interface EnvironmentSnapshot {
|
|
370
|
+
readonly environment: Record<string, unknown>;
|
|
371
|
+
/** 场景时间(ISO)。 */
|
|
372
|
+
readonly time?: string;
|
|
373
|
+
/** 相机视角(可选)。 */
|
|
374
|
+
readonly camera?: CameraPose;
|
|
375
|
+
/** 拍快照时的画质档位,只作记录;恢复时不改画质(画质由机器决定)。 */
|
|
376
|
+
readonly quality: Quality;
|
|
377
|
+
/** 拍快照时正在用的 sdk-render 场景预设。 */
|
|
378
|
+
readonly preset: EnvironmentPreset | null;
|
|
379
|
+
}
|
|
380
|
+
interface CaptureOptions {
|
|
381
|
+
/** 带上场景时间,默认 true。 */
|
|
382
|
+
readonly time?: boolean;
|
|
383
|
+
/** 存下相机视角,默认 true(存下来,但恢复时默认不飞过去)。 */
|
|
384
|
+
readonly camera?: boolean;
|
|
385
|
+
}
|
|
386
|
+
interface RestoreOptions {
|
|
387
|
+
/** 拨到快照里的时间(有的话),默认 true。 */
|
|
388
|
+
readonly time?: boolean;
|
|
389
|
+
/** 飞到快照里的视角(有的话),默认 false。 */
|
|
390
|
+
readonly camera?: boolean;
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* 项目预设文件(工程里的 environment/preset.json,由智作「环境预设」卡冻结写入)。
|
|
394
|
+
* 底座只认 schema 与 snapshot;名称、来源等元数据归预设层。
|
|
395
|
+
*/
|
|
396
|
+
declare const PRESET_DOCUMENT_SCHEMA = "smartearth-preset/1";
|
|
397
|
+
interface PresetDocumentCore {
|
|
398
|
+
readonly schema: typeof PRESET_DOCUMENT_SCHEMA;
|
|
399
|
+
readonly snapshot: EnvironmentSnapshot;
|
|
400
|
+
}
|
|
401
|
+
/** 校验并取出快照;不合格就抛 INVALID_OPTIONS,说清楚哪里不对。 */
|
|
402
|
+
declare function requireSnapshot(value: unknown, what?: string): EnvironmentSnapshot;
|
|
403
|
+
/** 校验项目预设文件,返回其中的快照。 */
|
|
404
|
+
declare function requirePresetDocument(value: unknown, what?: string): EnvironmentSnapshot;
|
|
405
|
+
|
|
406
|
+
/** 某个时区的几点几分(日期沿用场景当前日期),默认北京时间。 */
|
|
407
|
+
interface ClockOfDay {
|
|
408
|
+
/** 0~23。 */
|
|
409
|
+
readonly hour: number;
|
|
410
|
+
/** 0~59,默认 0。 */
|
|
411
|
+
readonly minute?: number;
|
|
412
|
+
/** 时区相对 UTC 的小时数(-12~14,可带小数,如 5.5),默认 8(北京时间)。 */
|
|
413
|
+
readonly utcOffset?: number;
|
|
414
|
+
}
|
|
415
|
+
/** 场景时间:Date、ISO 8601 字符串,或某时区(默认北京时间)的几点几分。 */
|
|
416
|
+
type EnvironmentTime = Date | string | ClockOfDay;
|
|
417
|
+
|
|
418
|
+
/** sdk-render 4.x 自带的场景预设(每个预设带一个北京时间,切换时会把时钟拨过去)。 */
|
|
419
|
+
declare const ENVIRONMENT_PRESETS: readonly [{
|
|
420
|
+
readonly id: "noon-clear";
|
|
421
|
+
readonly name: "晴天正午";
|
|
422
|
+
}, {
|
|
423
|
+
readonly id: "sunrise";
|
|
424
|
+
readonly name: "清晨日出";
|
|
425
|
+
}, {
|
|
426
|
+
readonly id: "sunset";
|
|
427
|
+
readonly name: "黄昏落日";
|
|
428
|
+
}, {
|
|
429
|
+
readonly id: "cloudy-afternoon";
|
|
430
|
+
readonly name: "多云午后";
|
|
431
|
+
}, {
|
|
432
|
+
readonly id: "overcast";
|
|
433
|
+
readonly name: "阴雨天气";
|
|
434
|
+
}, {
|
|
435
|
+
readonly id: "night";
|
|
436
|
+
readonly name: "夜间星空";
|
|
437
|
+
}, {
|
|
438
|
+
readonly id: "cinematic";
|
|
439
|
+
readonly name: "电影级";
|
|
440
|
+
}];
|
|
441
|
+
type EnvironmentPreset = (typeof ENVIRONMENT_PRESETS)[number]['id'];
|
|
442
|
+
/** setPreset 的选项;后两项是样板间的防护,默认开。 */
|
|
443
|
+
interface PresetOptions {
|
|
444
|
+
/** 过渡秒数,> 0 时渐变。 */
|
|
445
|
+
readonly transition?: number;
|
|
446
|
+
/** 相机高于这个高度(米)时先不切、等飞到这个高度以下再切,防高空过曝;默认 100000,传 false 关掉。 */
|
|
447
|
+
readonly deferAboveMeters?: number | false;
|
|
448
|
+
/** 保留 SSRT 镜面子层;默认 false:切完关掉它(低视角看大片地表会画出圆弧)。 */
|
|
449
|
+
readonly keepMirror?: boolean;
|
|
450
|
+
}
|
|
451
|
+
/** 环境变化的来源。 */
|
|
452
|
+
type EnvironmentChangeSource = 'time' | 'preset' | 'effect' | 'config' | 'snapshot' | 'quality' | 'panel';
|
|
453
|
+
interface EnvironmentChange {
|
|
454
|
+
readonly source: EnvironmentChangeSource;
|
|
455
|
+
}
|
|
456
|
+
interface ClockState {
|
|
457
|
+
/** 时间是否在走。 */
|
|
458
|
+
readonly animate: boolean;
|
|
459
|
+
/** 流速:1 = 真实速度,600 = 一秒走十分钟。 */
|
|
460
|
+
readonly multiplier: number;
|
|
461
|
+
}
|
|
462
|
+
/** sdk-render 的整份环境配置(version / metadata / settings / systems),可 JSON 序列化。 */
|
|
463
|
+
type EnvironmentConfig = Record<string, unknown>;
|
|
464
|
+
interface EarthEnvironment extends EffectApi, LightingApi {
|
|
465
|
+
/** 面板「全部启用」:所有渲染系统回到 SDK 默认参数并打开(不是交付基线);会退出当前预设。 */
|
|
466
|
+
enableAll(): void;
|
|
467
|
+
/** 面板「全部关闭」:关掉光照、阴影、大气、云、距离雾、高度雾、后处理;会退出当前预设。 */
|
|
468
|
+
disableAll(): void;
|
|
469
|
+
/**
|
|
470
|
+
* 导出整份环境配置(所有渲染系统的开关与参数,纯 JSON、不含令牌)。
|
|
471
|
+
* 导出的是基准值:画质不是 high 时先临时切回 high 读,再切回原档,存下的配置在任何机器上都是原样效果。
|
|
472
|
+
*/
|
|
473
|
+
exportConfig(): Promise<EnvironmentConfig>;
|
|
474
|
+
/** 拍环境快照(默认带时间、不带视角):预设与底座之间唯一的交换格式。 */
|
|
475
|
+
captureSnapshot(options?: CaptureOptions): Promise<EnvironmentSnapshot>;
|
|
476
|
+
/** 恢复环境快照(默认拨时间、不飞视角、不改画质);会退出当前 sdk-render 场景预设。 */
|
|
477
|
+
restoreSnapshot(snapshot: EnvironmentSnapshot, options?: RestoreOptions): Promise<void>;
|
|
478
|
+
/** 环境变化通知:source 说明是谁改的。返回取消订阅函数。 */
|
|
479
|
+
on(event: 'change', listener: (change: EnvironmentChange) => void): () => void;
|
|
480
|
+
/** 导入 exportConfig 导出的配置(或 sdk-render 面板导出的 JSON);会退出当前预设。 */
|
|
481
|
+
importConfig(config: EnvironmentConfig): Promise<void>;
|
|
482
|
+
/** 回到交付基线(sdk-render 的 'environment' 基线,即使建地球时选了 'cinematic')并保持当前画质;会退出当前预设,时间不变。 */
|
|
483
|
+
resetConfig(): Promise<void>;
|
|
484
|
+
/** 设场景时间(太阳方向、昼夜跟着变)。传 { hour, minute } 时按北京时间、日期不变。 */
|
|
485
|
+
setTime(time: EnvironmentTime): void;
|
|
486
|
+
getTime(): Date;
|
|
487
|
+
/** 当前几点几分,默认北京时间;传 utcOffset 换算到别的时区。 */
|
|
488
|
+
getClockOfDay(utcOffset?: number): Required<ClockOfDay>;
|
|
489
|
+
/** 让时间走起来或停下、调流速。 */
|
|
490
|
+
setClock(state: Partial<ClockState>): void;
|
|
491
|
+
getClock(): ClockState;
|
|
492
|
+
/** 预设列表(id + 中文名)。 */
|
|
493
|
+
readonly presets: readonly {
|
|
494
|
+
readonly id: EnvironmentPreset;
|
|
495
|
+
readonly name: string;
|
|
496
|
+
}[];
|
|
497
|
+
/** 切到预设;transition 秒数 > 0 时渐变过渡。预设会改时间和环境效果开关。 */
|
|
498
|
+
setPreset(id: EnvironmentPreset, options?: PresetOptions): void;
|
|
499
|
+
/** 相机太高、预设还在等飞到城市级时的预设 id;没有则为 null。 */
|
|
500
|
+
getPendingPreset(): EnvironmentPreset | null;
|
|
501
|
+
/** 当前预设 id;没用预设或已清除时为 null。 */
|
|
502
|
+
getPreset(): EnvironmentPreset | null;
|
|
503
|
+
/** 退出预设,环境效果回到进预设之前的样子(时间保持不变)。 */
|
|
504
|
+
clearPreset(): void;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
/** 运行时 Cesium 命名空间(可写副本)。类型沿用 cesium 包的导出。 */
|
|
508
|
+
type CesiumRuntime = typeof CesiumNS;
|
|
509
|
+
declare const CESIUM_MIN_VERSION = "1.132.0";
|
|
510
|
+
/** 不含:sdk-render 3.x 只验证到 1.136.x。 */
|
|
511
|
+
declare const CESIUM_MAX_VERSION_EXCLUSIVE = "1.137.0";
|
|
512
|
+
/**
|
|
513
|
+
* ESM 命名空间对象是只读冻结的;sdk-render 需要在 window.Cesium 上做运行时增强,
|
|
514
|
+
* 所以先解冻成可写副本(sdk-render 接口文档 §1 的 makeExtensible)。
|
|
515
|
+
*/
|
|
516
|
+
declare function makeExtensible<T extends object>(obj: T): T;
|
|
517
|
+
|
|
518
|
+
/** 所有图层描述的公共字段;具体种类在此基础上扩展。 */
|
|
519
|
+
interface LayerSpec {
|
|
520
|
+
readonly kind: string;
|
|
521
|
+
readonly id: string;
|
|
522
|
+
readonly visible?: boolean;
|
|
523
|
+
readonly [key: string]: unknown;
|
|
524
|
+
}
|
|
525
|
+
interface GeoPosition {
|
|
526
|
+
/** 度。 */
|
|
527
|
+
readonly lon: number;
|
|
528
|
+
/** 度。 */
|
|
529
|
+
readonly lat: number;
|
|
530
|
+
/** 米。 */
|
|
531
|
+
readonly height: number;
|
|
532
|
+
}
|
|
533
|
+
interface PickedFeature {
|
|
534
|
+
readonly layerId: string;
|
|
535
|
+
readonly featureId: string;
|
|
536
|
+
readonly properties: Readonly<Record<string, unknown>>;
|
|
537
|
+
}
|
|
538
|
+
/** 场景里的一次左键点击:点到图层要素时带 feature,点到地表时带位置。 */
|
|
539
|
+
interface ClickEvent {
|
|
540
|
+
readonly feature?: PickedFeature;
|
|
541
|
+
readonly position?: GeoPosition;
|
|
542
|
+
/** 世界坐标:点到实体时取实体位置,否则取地表交点。 */
|
|
543
|
+
readonly worldPosition?: Cartesian3;
|
|
544
|
+
/** 画布像素坐标。 */
|
|
545
|
+
readonly screen: {
|
|
546
|
+
readonly x: number;
|
|
547
|
+
readonly y: number;
|
|
548
|
+
};
|
|
549
|
+
}
|
|
550
|
+
/** 把 scene.pick 的结果(实体以外,如 3D Tiles 要素)解释成图层要素;认不出返回 undefined。 */
|
|
551
|
+
type PickResolver = (picked: unknown) => PickedFeature | undefined;
|
|
552
|
+
interface LayerContext {
|
|
553
|
+
readonly viewer: Viewer;
|
|
554
|
+
readonly Cesium: CesiumRuntime;
|
|
555
|
+
readonly render: Render;
|
|
556
|
+
/** sdk-render 4.x 的 PBR 接口;3.0 下为 undefined。 */
|
|
557
|
+
readonly pbr: EarthPbr | undefined;
|
|
558
|
+
/** 已加载的 sdk-render 版本号(getVersionInfo().version);读不到为 undefined。 */
|
|
559
|
+
readonly sdkRenderVersion: string | undefined;
|
|
560
|
+
/** 图层把可拾取的实体登记到这里,pick 事件据此回报图层与要素。 */
|
|
561
|
+
readonly registerPickable: (entity: Entity, feature: PickedFeature) => void;
|
|
562
|
+
readonly unregisterPickable: (entity: Entity) => void;
|
|
563
|
+
/** 实体以外的可拾取对象(如 3D Tiles 要素);返回取消登记的函数。 */
|
|
564
|
+
readonly registerPickResolver: (resolver: PickResolver) => () => void;
|
|
565
|
+
/** 监听场景左键点击;返回取消监听的函数。 */
|
|
566
|
+
readonly onClick: (listener: (event: ClickEvent) => void) => () => void;
|
|
567
|
+
}
|
|
568
|
+
/** 图层工厂返回的句柄。 */
|
|
569
|
+
interface LayerHandle {
|
|
570
|
+
setVisible(visible: boolean): void;
|
|
571
|
+
/** 可选:供 flyTo(layerId) 使用。 */
|
|
572
|
+
flyTarget?(): unknown;
|
|
573
|
+
/** 可选:图层自己的操作接口,经 earth.layers.get(id) 取到(如航线的 play/pause)。 */
|
|
574
|
+
readonly api?: unknown;
|
|
575
|
+
destroy(): void;
|
|
576
|
+
}
|
|
577
|
+
type LayerFactory<S extends LayerSpec = LayerSpec> = (context: LayerContext, spec: S) => LayerHandle | Promise<LayerHandle>;
|
|
578
|
+
interface LayerInfo {
|
|
579
|
+
readonly id: string;
|
|
580
|
+
readonly kind: string;
|
|
581
|
+
readonly visible: boolean;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
interface PickEvent extends PickedFeature {
|
|
585
|
+
/** 拾取点经纬度(度)与高度(米);拾不到地表时为 undefined。 */
|
|
586
|
+
readonly position?: {
|
|
587
|
+
readonly lon: number;
|
|
588
|
+
readonly lat: number;
|
|
589
|
+
readonly height: number;
|
|
590
|
+
};
|
|
591
|
+
}
|
|
592
|
+
interface EarthEvents extends Record<string, unknown> {
|
|
593
|
+
pick: PickEvent;
|
|
594
|
+
}
|
|
595
|
+
interface FlyToTarget {
|
|
596
|
+
readonly lon: number;
|
|
597
|
+
readonly lat: number;
|
|
598
|
+
readonly height: number;
|
|
599
|
+
readonly heading?: number;
|
|
600
|
+
readonly pitch?: number;
|
|
601
|
+
/** 秒,默认 1.5。 */
|
|
602
|
+
readonly duration?: number;
|
|
603
|
+
}
|
|
604
|
+
interface EarthLayers {
|
|
605
|
+
register<S extends LayerSpec>(kind: string, factory: LayerFactory<S>): void;
|
|
606
|
+
add(spec: LayerSpec): Promise<LayerInfo>;
|
|
607
|
+
remove(id: string): boolean;
|
|
608
|
+
setVisible(id: string, visible: boolean): void;
|
|
609
|
+
list(): LayerInfo[];
|
|
610
|
+
/** 取图层的操作接口,如 route 的 play/pause、annotation 的 exportJSON;见各图层的 *Api 类型。 */
|
|
611
|
+
get<T = unknown>(id: string): T | undefined;
|
|
612
|
+
}
|
|
613
|
+
interface Earth {
|
|
614
|
+
readonly viewer: Viewer;
|
|
615
|
+
readonly render: Render;
|
|
616
|
+
/** 当前画质。 */
|
|
617
|
+
readonly quality: Quality;
|
|
618
|
+
/** 当前 sdk-render 能切到的画质(3.0 为 ['high','low'],4.x 为三档)。 */
|
|
619
|
+
readonly supportedQualities: readonly Quality[];
|
|
620
|
+
setQuality(quality: Quality): Promise<void>;
|
|
621
|
+
readonly layers: EarthLayers;
|
|
622
|
+
/** sdk-render 4.x 的模型材质(PBR)接口;3.0 下为 undefined。 */
|
|
623
|
+
readonly pbr: EarthPbr | undefined;
|
|
624
|
+
/** 光照时间、场景预设、环境与画面效果。 */
|
|
625
|
+
readonly environment: EarthEnvironment;
|
|
626
|
+
/** 显示 / 隐藏 sdk-render 自带的环境控制面板(默认显示);需要 4.x。 */
|
|
627
|
+
showPanel(visible?: boolean): Promise<void>;
|
|
628
|
+
/** 截当前画面(JPEG dataURL),预设缩略图用;maxWidth 默认 480 像素。 */
|
|
629
|
+
captureImage(maxWidth?: number): Promise<string>;
|
|
630
|
+
readonly isPanelVisible: boolean;
|
|
631
|
+
/** 飞到经纬度,或飞到某个图层(传图层 id)。 */
|
|
632
|
+
flyTo(target: FlyToTarget | string): Promise<void>;
|
|
633
|
+
on<K extends keyof EarthEvents>(event: K, listener: (payload: EarthEvents[K]) => void): () => void;
|
|
634
|
+
destroy(): void;
|
|
635
|
+
}
|
|
636
|
+
/**
|
|
637
|
+
* 不建地球就能知道已安装的 sdk-render 支持哪些画质(看 Render 原型上有没有 setQuality),
|
|
638
|
+
* 用来在 createEarth 之前决定初始画质。
|
|
639
|
+
*/
|
|
640
|
+
declare function getSupportedQualities(): readonly Quality[];
|
|
641
|
+
/**
|
|
642
|
+
* 建一个 SmartEarth 三维地球。任何一步失败都抛 SmartEarthError,并清理已创建的 Viewer;
|
|
643
|
+
* 不会退化成没有 SmartEarth 渲染的普通 Cesium。
|
|
644
|
+
*/
|
|
645
|
+
declare function createEarth(container: HTMLElement, rawOptions: CreateEarthOptions): Promise<Earth>;
|
|
646
|
+
|
|
647
|
+
export { createEarthPbr as $, type LayerContext as A, type LayerFactory as B, CESIUM_MAX_VERSION_EXCLUSIVE as C, type LayerHandle as D, ENVIRONMENT_PRESETS as E, type FlyToTarget as F, type GeoPosition as G, type LayerInfo as H, type InitialView as I, type LightDirection as J, type LightingMode as K, type LayerSpec as L, PRESET_DOCUMENT_SCHEMA as M, type PbrConfig as N, type PbrGlobalParams as O, type PbrMaterialParams as P, type PbrTarget as Q, type PickEvent as R, type PickResolver as S, type PresetDocumentCore as T, type Quality as U, type RestoreOptions as V, type SceneFogOptions as W, type SdkAuth as X, type TerrainAdjustOptions as Y, type WindOptions as Z, createEarth as _, type PickedFeature as a, getSupportedQualities as a0, makeExtensible as a1, requirePresetDocument as a2, requireSnapshot as a3, supportsPbr as a4, CESIUM_MIN_VERSION as b, COLOR_FILTERS as c, type CameraPose as d, type CaptureOptions as e, type ClickEvent as f, type ClockOfDay as g, type ClockState as h, type ColorFilter as i, type CreateEarthOptions as j, type CustomBasemap as k, type Earth as l, type EarthEnvironment as m, type EarthEvents as n, type EarthLayers as o, type EarthPbr as p, type EffectOptions as q, type EffectOptionsTarget as r, type EnvironmentBaseline as s, type EnvironmentChange as t, type EnvironmentChangeSource as u, type EnvironmentConfig as v, type EnvironmentEffect as w, type EnvironmentPreset as x, type EnvironmentSnapshot as y, type EnvironmentTime as z };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SmartEarth 统一错误。所有初始化与运行期失败都抛这个类型,code 供程序判断,message 给人看(中文)。
|
|
3
|
+
*
|
|
4
|
+
* 绝不静默降级成普通 Cesium:授权、版本、资源、渲染任何一步失败都直接抛出。
|
|
5
|
+
*/
|
|
6
|
+
type SmartEarthErrorCode = 'INVALID_OPTIONS' | 'AUTH_MISSING_SDK' | 'AUTH_MISSING_MAP' | 'AUTH_FAILED' | 'CESIUM_VERSION' | 'ASSETS_MISSING' | 'RENDER_INIT_FAILED' | 'QUALITY_UNSUPPORTED' | 'LAYER_KIND_UNKNOWN' | 'LAYER_DUPLICATE' | 'LAYER_NOT_FOUND' | 'LAYER_LOAD_FAILED' | 'PBR_UNSUPPORTED' | 'ENVIRONMENT_UNSUPPORTED' | 'DESTROYED';
|
|
7
|
+
declare const MAP_TOKEN_APPLY_URL = "https://datacloud.geovisearth.com/";
|
|
8
|
+
declare class SmartEarthError extends Error {
|
|
9
|
+
readonly code: SmartEarthErrorCode;
|
|
10
|
+
readonly cause?: unknown;
|
|
11
|
+
constructor(code: SmartEarthErrorCode, message: string, cause?: unknown);
|
|
12
|
+
}
|
|
13
|
+
declare function isSmartEarthError(value: unknown): value is SmartEarthError;
|
|
14
|
+
|
|
15
|
+
export { MAP_TOKEN_APPLY_URL as M, SmartEarthError as S, type SmartEarthErrorCode as a, isSmartEarthError as i };
|