vesium 1.0.1-beta.50 → 1.0.1-beta.52

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.
@@ -0,0 +1,1323 @@
1
+ import { Arrayable, FunctionArgs, MaybeComputedElementRef } from "@vueuse/core";
2
+ import { ComputedRef, MaybeRef, MaybeRefOrGetter, Ref, ShallowReactive, ShallowRef, WatchStopHandle } from "vue";
3
+ import { Camera, Cartesian2, Cartesian3, Cartographic, CustomDataSource, CzmlDataSource, DataSource, DataSourceCollection, Entity, EntityCollection, Event, GeoJsonDataSource, GpxDataSource, ImageryLayer, ImageryLayerCollection, JulianDate, KeyboardEventModifier, KmlDataSource, Material, MaterialProperty, PostProcessStage, PostProcessStageCollection, PrimitiveCollection, Property, Rectangle, Scene, ScreenSpaceEventHandler, ScreenSpaceEventType, TextureMagnificationFilter, TextureMinificationFilter, Viewer } from "cesium";
4
+ import { Position } from "geojson";
5
+
6
+ //#region createViewer/index.d.ts
7
+
8
+ /**
9
+ * Pass in an existing Viewer instance,
10
+ * which can be accessed by the current component and its descendant components using {@link useViewer}
11
+ *
12
+ * When the Viewer instance referenced by this overloaded function becomes invalid, it will not trigger destruction.
13
+ * @param viewer - Existing viewer instance
14
+ * @returns The Viewer instance
15
+ */
16
+ declare function createViewer(viewer: MaybeRef<Viewer | undefined>): Readonly<ShallowRef<Viewer | undefined>>;
17
+ /**
18
+ * Initialize a Viewer instance, which can be accessed by the
19
+ * current component and its descendant components using {@link useViewer}.
20
+ *
21
+ * The Viewer instance created by this overloaded function will automatically be destroyed when it becomes invalid.
22
+ *
23
+ * @param element - The DOM element or ID that will contain the widget
24
+ * @param options - see `Viewer.ConstructorOptions`
25
+ * @returns The Viewer instance
26
+ */
27
+ declare function createViewer(element?: MaybeComputedElementRef, options?: Viewer.ConstructorOptions): Readonly<ShallowRef<Viewer | undefined>>;
28
+ //# sourceMappingURL=index.d.ts.map
29
+ //#endregion
30
+ //#region toPromiseValue/index.d.ts
31
+ type OnAsyncGetterCancel = (onCancel: () => void) => void;
32
+ type MaybeAsyncGetter<T> = () => (Promise<T> | T);
33
+ type MaybeRefOrAsyncGetter<T> = MaybeRef<T> | MaybeAsyncGetter<T>;
34
+ interface ToPromiseValueOptions {
35
+ /**
36
+ * Determines whether the source should be unwrapped to its raw value.
37
+ * @default true
38
+ */
39
+ raw?: boolean;
40
+ }
41
+ /**
42
+ * Similar to Vue's built-in `toValue`, but capable of handling asynchronous functions, thus returning a `await value`.
43
+ *
44
+ * Used in conjunction with VueUse's `computedAsync`.
45
+ *
46
+ * @param source The source value, which can be a reactive reference or an asynchronous getter.
47
+ * @param options Conversion options
48
+ * @returns The converted value.
49
+ *
50
+ * @example
51
+ * ```ts
52
+ *
53
+ * const data = computedAsync(async ()=> {
54
+ * return await toPromiseValue(promiseRef)
55
+ * })
56
+ *
57
+ * ```
58
+ */
59
+ declare function toPromiseValue<T>(source: MaybeRefOrAsyncGetter<T>, options?: ToPromiseValueOptions): Promise<T>;
60
+ //# sourceMappingURL=index.d.ts.map
61
+ //#endregion
62
+ //#region useCameraState/index.d.ts
63
+ interface UseCameraStateOptions {
64
+ /**
65
+ * The camera to use
66
+ * @default useViewer().value.scene.camera
67
+ */
68
+ camera?: MaybeRefOrGetter<Camera | undefined>;
69
+ /**
70
+ * Camera event type to watch
71
+ * @default `changed`
72
+ */
73
+ event?: MaybeRefOrGetter<'changed' | 'moveStart' | 'moveEnd'>;
74
+ /**
75
+ * Throttled delay duration (ms)
76
+ * @default 8
77
+ */
78
+ delay?: number;
79
+ }
80
+ interface UseCameraStateRetrun {
81
+ /**
82
+ * The camera
83
+ */
84
+ camera: ComputedRef<Camera | undefined>;
85
+ /**
86
+ * The position of the camera
87
+ */
88
+ position: ComputedRef<Cartesian3 | undefined>;
89
+ /**
90
+ * The view direction of the camer
91
+ */
92
+ direction: ComputedRef<Cartesian3 | undefined>;
93
+ /**
94
+ * The up direction of the camera
95
+ */
96
+ up: ComputedRef<Cartesian3 | undefined>;
97
+ /**
98
+ * The right direction of the camera
99
+ */
100
+ right: ComputedRef<Cartesian3 | undefined>;
101
+ /**
102
+ * Gets the {@link Cartographic} position of the camera, with longitude and latitude
103
+ * expressed in radians and height in meters. In 2D and Columbus View, it is possible
104
+ * for the returned longitude and latitude to be outside the range of valid longitudes
105
+ * and latitudes when the camera is outside the map.
106
+ */
107
+ positionCartographic: ComputedRef<Cartographic | undefined>;
108
+ /**
109
+ * Gets the position of the camera in world coordinates
110
+ */
111
+ positionWC: ComputedRef<Cartesian3 | undefined>;
112
+ /**
113
+ * Gets the view direction of the camera in world coordinates
114
+ */
115
+ directionWC: ComputedRef<Cartesian3 | undefined>;
116
+ /**
117
+ * Gets the up direction of the camera in world coordinates
118
+ */
119
+ upWC: ComputedRef<Cartesian3 | undefined>;
120
+ /**
121
+ * Gets the right direction of the camera in world coordinates
122
+ */
123
+ rightWC: ComputedRef<Cartesian3 | undefined>;
124
+ /**
125
+ * Computes the approximate visible rectangle on the ellipsoid
126
+ */
127
+ viewRectangle: ComputedRef<Rectangle | undefined>;
128
+ /**
129
+ * Gets the camera heading in radians
130
+ */
131
+ heading: ComputedRef<number | undefined>;
132
+ /**
133
+ * Gets the camera pitch in radians
134
+ */
135
+ pitch: ComputedRef<number | undefined>;
136
+ /**
137
+ * Gets the camera roll in radians
138
+ */
139
+ roll: ComputedRef<number | undefined>;
140
+ /**
141
+ * Gets the camera center hierarchy level
142
+ */
143
+ level: ComputedRef<number | undefined>;
144
+ }
145
+ /**
146
+ * Reactive Cesium Camera state
147
+ * @param options options
148
+ * @returns Reactive camera states
149
+ */
150
+ declare function useCameraState(options?: UseCameraStateOptions): UseCameraStateRetrun;
151
+ //# sourceMappingURL=index.d.ts.map
152
+ //#endregion
153
+ //#region useCesiumEventListener/index.d.ts
154
+ interface UseCesiumEventListenerOptions {
155
+ /**
156
+ * Whether to active the event listener.
157
+ * @default true
158
+ */
159
+ isActive?: MaybeRefOrGetter<boolean>;
160
+ }
161
+ /**
162
+ * Easily use the `addEventListener` in `Cesium.Event` instances,
163
+ * when the dependent data changes or the component is unmounted,
164
+ * the listener function will automatically reload or destroy.
165
+ *
166
+ * @param event The Cesium.Event instance
167
+ * @param listener The listener function
168
+ * @param options additional options
169
+ * @returns A function that can be called to remove the event listener
170
+ */
171
+ declare function useCesiumEventListener<FN extends FunctionArgs<any[]>>(event: Arrayable<Event<FN> | undefined> | Arrayable<MaybeRefOrGetter<Event<FN> | undefined>> | MaybeRefOrGetter<Arrayable<Event<FN> | undefined>>, listener: FN, options?: UseCesiumEventListenerOptions): WatchStopHandle;
172
+ //# sourceMappingURL=index.d.ts.map
173
+ //#endregion
174
+ //#region useCesiumFps/index.d.ts
175
+ interface UseCesiumFpsOptions {
176
+ /**
177
+ * Throttled sampling (ms)
178
+ * @default 100
179
+ */
180
+ delay?: number;
181
+ }
182
+ interface UseCesiumFpsRetrun {
183
+ /**
184
+ * Inter-frame Interval (ms)
185
+ */
186
+ interval: Readonly<Ref<number>>;
187
+ /**
188
+ * Frames Per Second
189
+ */
190
+ fps: Readonly<Ref<number>>;
191
+ }
192
+ /**
193
+ * Reactive get the frame rate of Cesium
194
+ * @param options options
195
+ * @returns Reactive fps states
196
+ */
197
+ declare function useCesiumFps(options?: UseCesiumFpsOptions): UseCesiumFpsRetrun;
198
+ //# sourceMappingURL=index.d.ts.map
199
+ //#endregion
200
+ //#region useCollectionScope/index.d.ts
201
+ type EffcetRemovePredicate<T> = (instance: T) => boolean;
202
+ interface UseCollectionScopeReturn<isPromise extends boolean, T, AddArgs extends any[], RemoveArgs extends any[], RemoveReturn = any> {
203
+ /**
204
+ * A `Set` for storing SideEffect instance,
205
+ * which is encapsulated using `ShallowReactive` to provide Vue's reactive functionality
206
+ */
207
+ scope: Readonly<ShallowReactive<Set<T>>>;
208
+ /**
209
+ * Add SideEffect instance
210
+ */
211
+ add: (i: T, ...args: AddArgs) => isPromise extends true ? Promise<T> : T;
212
+ /**
213
+ * Remove specified SideEffect instance
214
+ */
215
+ remove: (i: T, ...args: RemoveArgs) => RemoveReturn;
216
+ /**
217
+ * Remove all SideEffect instance that meets the specified criteria
218
+ */
219
+ removeWhere: (predicate: EffcetRemovePredicate<T>, ...args: RemoveArgs) => void;
220
+ /**
221
+ * Remove all SideEffect instance within current scope
222
+ */
223
+ removeScope: (...args: RemoveArgs) => void;
224
+ }
225
+ /**
226
+ * Scope the SideEffects of Cesium-related `Collection` and automatically remove them when unmounted.
227
+ * - note: This is a basic function that is intended to be called by other lower-level function
228
+ * @param addFn - add SideEffect function. eg.`entites.add`
229
+ * @param removeFn - Clean SideEffect function. eg.`entities.remove`
230
+ * @param removeScopeArgs - The parameters to pass for `removeScope` triggered when the component is unmounted
231
+ *
232
+ * @returns Contains side effect addition and removal functions
233
+ */
234
+ declare function useCollectionScope<isPromise extends boolean, T = any, AddArgs extends any[] = any[], RemoveArgs extends any[] = any[], RemoveReturn = any>(addFn: (i: T, ...args: AddArgs) => isPromise extends true ? Promise<T> : T, removeFn: (i: T, ...args: RemoveArgs) => RemoveReturn, removeScopeArgs: RemoveArgs): UseCollectionScopeReturn<isPromise, T, AddArgs, RemoveArgs, RemoveReturn>;
235
+ //# sourceMappingURL=index.d.ts.map
236
+ //#endregion
237
+ //#region utils/arrayDiff.d.ts
238
+ interface ArrayDiffRetrun<T> {
239
+ added: T[];
240
+ removed: T[];
241
+ }
242
+ /**
243
+ * 计算两个数组的差异,返回新增和删除的元素
244
+ */
245
+ declare function arrayDiff<T>(list: T[], oldList: T[] | undefined): ArrayDiffRetrun<T>;
246
+ //# sourceMappingURL=arrayDiff.d.ts.map
247
+
248
+ //#endregion
249
+ //#region utils/canvasCoordToCartesian.d.ts
250
+ /**
251
+ * Convert canvas coordinates to Cartesian coordinates
252
+ *
253
+ * @param canvasCoord Canvas coordinates
254
+ * @param scene Cesium.Scene instance
255
+ * @param mode optional values are 'pickPosition' | 'globePick' | 'auto' | 'noHeight' @default 'auto'
256
+ *
257
+ * `pickPosition`: Use scene.pickPosition for conversion, which can be used for picking models, oblique photography, etc.
258
+ * However, if depth detection is not enabled (globe.depthTestAgainstTerrain=false), picking terrain or inaccurate issues may occur
259
+ *
260
+ * `globePick`: Use camera.getPickRay for conversion, which cannot be used for picking models or oblique photography,
261
+ * but can be used for picking terrain. If terrain does not exist, the picked elevation is 0
262
+ *
263
+ * `auto`: Automatically determine which picking content to return
264
+ *
265
+ * Calculation speed comparison: globePick > auto >= pickPosition
266
+ */
267
+ declare function canvasCoordToCartesian(canvasCoord: Cartesian2, scene: Scene, mode?: 'pickPosition' | 'globePick' | 'auto'): Cartesian3 | undefined;
268
+ //# sourceMappingURL=canvasCoordToCartesian.d.ts.map
269
+ //#endregion
270
+ //#region utils/cartesianToCanvasCoord.d.ts
271
+ /**
272
+ * Convert Cartesian coordinates to canvas coordinates
273
+ *
274
+ * @param position Cartesian coordinates
275
+ * @param scene Cesium.Scene instance
276
+ */
277
+ declare function cartesianToCanvasCoord(position: Cartesian3, scene: Scene): Cartesian2;
278
+ //# sourceMappingURL=cartesianToCanvasCoord.d.ts.map
279
+
280
+ //#endregion
281
+ //#region utils/cesiumEquals.d.ts
282
+ /**
283
+ * Determines if two Cesium objects are equal.
284
+ *
285
+ * This function not only judges whether the instances are equal,
286
+ * but also judges the equals method in the example.
287
+ *
288
+ * @param left The first Cesium object
289
+ * @param right The second Cesium object
290
+ * @returns Returns true if the two Cesium objects are equal, otherwise false
291
+ */
292
+ declare function cesiumEquals(left: any, right: any): boolean;
293
+ //# sourceMappingURL=cesiumEquals.d.ts.map
294
+ //#endregion
295
+ //#region utils/types.d.ts
296
+ type Nullable<T> = T | null | undefined;
297
+ type BasicType = number | string | boolean | symbol | bigint | null | undefined;
298
+ type ArgsFn<Args extends any[] = any[], Return = void> = (...args: Args) => Return;
299
+ type AnyFn = (...args: any[]) => any;
300
+ type MaybePromise<T = any> = T | (() => T) | Promise<T> | (() => Promise<T>);
301
+ /**
302
+ * 2D Coordinate System
303
+ */
304
+ type CoordArray = Position;
305
+ /**
306
+ * 3D Coordinate System
307
+ */
308
+ type CoordArray_ALT = [longitude: number, latitude: number, height?: number];
309
+ /**
310
+ * 2D Coordinate System
311
+ */
312
+ interface CoordObject {
313
+ longitude: number;
314
+ latitude: number;
315
+ }
316
+ /**
317
+ * 3D Coordinate System
318
+ */
319
+ interface CoordObject_ALT {
320
+ longitude: number;
321
+ latitude: number;
322
+ height?: number | undefined;
323
+ }
324
+ /**
325
+ * Common Coordinate
326
+ * Can be a Cartesian3 point, a Cartographic point, an array, or an object containing longitude, latitude, and optional height information
327
+ */
328
+ type CommonCoord = Cartesian3 | Cartographic | CoordArray | CoordArray_ALT | CoordObject | CoordObject_ALT;
329
+ /**
330
+ * Common DataSource
331
+ */
332
+ type CesiumDataSource = DataSource | CustomDataSource | CzmlDataSource | GeoJsonDataSource | GpxDataSource | KmlDataSource;
333
+ //# sourceMappingURL=types.d.ts.map
334
+ //#endregion
335
+ //#region utils/convertDMS.d.ts
336
+ type DMSCoord = [longitude: string, latitude: string, height?: number];
337
+ /**
338
+ * Convert degrees to DMS (Degrees Minutes Seconds) format string
339
+ *
340
+ * @param degrees The angle value
341
+ * @param precision The number of decimal places to retain for the seconds, defaults to 3
342
+ * @returns A DMS formatted string in the format: degrees° minutes′ seconds″
343
+ */
344
+ declare function dmsEncode(degrees: number, precision?: number): string;
345
+ /**
346
+ * Decode a DMS (Degrees Minutes Seconds) formatted string to a decimal angle value
347
+ *
348
+ * @param dmsCode DMS formatted string, e.g. "120°30′45″N"
349
+ * @returns The decoded decimal angle value, or 0 if decoding fails
350
+ */
351
+ declare function dmsDecode(dmsCode: string): number;
352
+ /**
353
+ * Convert latitude and longitude coordinates to degrees-minutes-seconds format
354
+ *
355
+ * @param position The latitude and longitude coordinates
356
+ * @param precision The number of decimal places to retain for 'seconds', default is 3
357
+ * @returns Returns the coordinates in degrees-minutes-seconds format, or undefined if the conversion fails
358
+ */
359
+ declare function degreesToDms(position: CommonCoord, precision?: number): DMSCoord | undefined;
360
+ /**
361
+ * Convert DMS (Degrees Minutes Seconds) format to decimal degrees for latitude and longitude coordinates
362
+ *
363
+ * @param dms The latitude or longitude coordinate in DMS format
364
+ * @returns Returns the coordinate in decimal degrees format, or undefined if the conversion fails
365
+ */
366
+ declare function dmsToDegrees(dms: DMSCoord): CoordArray_ALT | undefined;
367
+ //# sourceMappingURL=convertDMS.d.ts.map
368
+ //#endregion
369
+ //#region utils/is.d.ts
370
+ declare function isDef<T = any>(val?: T): val is T;
371
+ declare function isBoolean(val: any): val is boolean;
372
+ declare function isFunction<T extends AnyFn>(val: any): val is T;
373
+ declare function isNumber(val: any): val is number;
374
+ declare function isString(val: unknown): val is string;
375
+ declare function isObject(val: any): val is object;
376
+ declare function isWindow(val: any): val is Window;
377
+ declare function isPromise$1<T extends Promise<any>>(val: any): val is T;
378
+ declare function isElement<T extends Element>(val: any): val is T;
379
+ declare const isArray: (arg: any) => arg is any[];
380
+ declare function isBase64(val: string): boolean;
381
+ declare function assertError(condition: boolean, error: any): void;
382
+ //# sourceMappingURL=is.d.ts.map
383
+ //#endregion
384
+ //#region utils/property.d.ts
385
+ type MaybeProperty<T = any> = T | {
386
+ getValue: (time?: JulianDate) => T;
387
+ };
388
+ type MaybePropertyOrGetter<T = any> = MaybeProperty<T> | (() => T);
389
+ /**
390
+ * Is Cesium.Property
391
+ * @param value - The target object
392
+ */
393
+ declare function isProperty(value: any): value is Property;
394
+ /**
395
+ * Converts a value that may be a Property into its target value, @see {toProperty} for the reverse operation
396
+ * ```typescript
397
+ * toPropertyValue('val') //=> 'val'
398
+ * toPropertyValue(new ConstantProperty('val')) //=> 'val'
399
+ * toPropertyValue(new CallbackProperty(()=>'val')) //=> 'val'
400
+ * ```
401
+ *
402
+ * @param value - The value to convert
403
+ */
404
+ declare function toPropertyValue<T = unknown>(value: MaybeProperty<T>, time?: JulianDate): T;
405
+ type PropertyCallback<T = any> = (time: JulianDate, result?: T) => T;
406
+ /**
407
+ * Converts a value that may be a Property into a Property object, @see {toPropertyValue} for the reverse operation
408
+ *
409
+ * @param value - The property value or getter to convert, can be undefined or null
410
+ * @param isConstant - The second parameter for converting to CallbackProperty
411
+ * @returns Returns the converted Property object, if value is undefined or null, returns undefined
412
+ */
413
+ declare function toProperty<T>(value?: MaybePropertyOrGetter<T>, isConstant?: boolean): Property;
414
+ /**
415
+ * Create a Cesium property key
416
+ *
417
+ * @param scope The host object
418
+ * @param field The property name
419
+ * @param maybeProperty Optional property or getter
420
+ * @param readonly Whether the property is read-only
421
+ */
422
+ declare function createPropertyField<T>(scope: any, field: string, maybeProperty?: MaybePropertyOrGetter<T>, readonly?: boolean): void;
423
+ interface CreateCesiumAttributeOptions {
424
+ readonly?: boolean;
425
+ toProperty?: boolean;
426
+ /**
427
+ * The event name that triggers the change
428
+ * @default 'definitionChanged'
429
+ */
430
+ changedEventKey?: string;
431
+ shallowClone?: boolean;
432
+ }
433
+ declare function createCesiumAttribute<Scope extends object>(scope: Scope, key: keyof Scope, value: any, options?: CreateCesiumAttributeOptions): void;
434
+ interface CreateCesiumPropertyOptions {
435
+ readonly?: boolean;
436
+ /**
437
+ * The event name that triggers the change
438
+ * @default 'definitionChanged'
439
+ */
440
+ changedEventKey?: string;
441
+ }
442
+ declare function createCesiumProperty<Scope extends object>(scope: Scope, key: keyof Scope, value: any, options?: CreateCesiumPropertyOptions): void;
443
+ //# sourceMappingURL=property.d.ts.map
444
+ //#endregion
445
+ //#region utils/isCesiumConstant.d.ts
446
+ /**
447
+ * Determines if the Cesium property is a constant.
448
+ *
449
+ * @param value Cesium property
450
+ */
451
+ declare function isCesiumConstant(value: MaybeProperty): boolean;
452
+ //# sourceMappingURL=isCesiumConstant.d.ts.map
453
+ //#endregion
454
+ //#region utils/material.d.ts
455
+ /**
456
+ * Cesium.Material.fabric parameters
457
+ */
458
+ interface CesiumMaterialFabricOptions<U> {
459
+ /**
460
+ * Used to declare what material the fabric object will ultimately generate. If it's an official built-in one, use the official built-in one directly; otherwise, create a custom material and cache it.
461
+ */
462
+ type: string;
463
+ /**
464
+ * Can nest another level of child fabric to form a composite material
465
+ */
466
+ materials?: Material;
467
+ /**
468
+ * glsl code
469
+ */
470
+ source?: string;
471
+ components?: {
472
+ diffuse?: string;
473
+ alpha?: string;
474
+ };
475
+ /**
476
+ * Pass variables to glsl code
477
+ */
478
+ uniforms?: U & Record<string, any>;
479
+ }
480
+ /**
481
+ * Cesium.Material parameters
482
+ */
483
+ interface CesiumMaterialConstructorOptions<U> {
484
+ /**
485
+ * Strict mode
486
+ */
487
+ strict?: boolean;
488
+ /**
489
+ * translucent
490
+ */
491
+ translucent?: boolean | ((...params: any[]) => any);
492
+ /**
493
+ * Minification filter
494
+ */
495
+ minificationFilter?: TextureMinificationFilter;
496
+ /**
497
+ * Magnification filter
498
+ */
499
+ magnificationFilter?: TextureMagnificationFilter;
500
+ /**
501
+ * Matrix configuration
502
+ */
503
+ fabric: CesiumMaterialFabricOptions<U>;
504
+ }
505
+ /**
506
+ * Only as a type fix for `Cesium.Material`
507
+ */
508
+ declare class CesiumMaterial<U> extends Material {
509
+ constructor(options: CesiumMaterialConstructorOptions<U>);
510
+ /**
511
+ * Matrix configuration
512
+ */
513
+ fabric: CesiumMaterialFabricOptions<U>;
514
+ }
515
+ /**
516
+ * Only as a type fix for `Cesium.MaterialProperty`
517
+ */
518
+ interface CesiumMaterialProperty<V> extends MaterialProperty {
519
+ get isConstant(): boolean;
520
+ get definitionChanged(): Event<(scope: this, field: string, value: any, previous: any) => void>;
521
+ getType: (time: JulianDate) => string;
522
+ getValue: (time: JulianDate, result?: V) => V;
523
+ equals: (other?: any) => boolean;
524
+ }
525
+ /**
526
+ * Get material from cache, alias of `Material._materialCache.getMaterial`
527
+ */
528
+ declare function getMaterialCache<T extends Material = CesiumMaterial<any>>(type: string): T | undefined;
529
+ /**
530
+ * Add material to Cesium's material cache, alias of `Material._materialCache.addMaterial`
531
+ */
532
+ declare function addMaterialCache(type: string, material: CesiumMaterialConstructorOptions<any>): void;
533
+ //# sourceMappingURL=material.d.ts.map
534
+ //#endregion
535
+ //#region utils/pick.d.ts
536
+ /**
537
+ * Analyze the result of Cesium's `scene.pick` and convert it to an array format
538
+ */
539
+ declare function resolvePick(pick?: any): any[];
540
+ /**
541
+ * Determine if the given array of graphics is hit by Cesium's `scene.pick`
542
+ *
543
+ * @param pick The `scene.pick` object used for matching
544
+ * @param graphic An array of graphics to check for hits
545
+ */
546
+ declare function pickHitGraphic(pick: any, graphic: any | any[]): boolean;
547
+ //# sourceMappingURL=pick.d.ts.map
548
+ //#endregion
549
+ //#region utils/throttle.d.ts
550
+ type ThrottleCallback<T extends any[]> = (...rest: T) => void;
551
+ /**
552
+ * Throttle function, which limits the frequency of execution of the function
553
+ *
554
+ * @param callback raw function
555
+ * @param delay Throttled delay duration (ms)
556
+ * @param trailing Trigger callback function after last call @default true
557
+ * @param leading Trigger the callback function immediately on the first call @default false
558
+ * @returns Throttle function
559
+ */
560
+ declare function throttle<T extends any[]>(callback: ThrottleCallback<T>, delay?: number, trailing?: boolean, leading?: boolean): ThrottleCallback<T>;
561
+ //# sourceMappingURL=throttle.d.ts.map
562
+ //#endregion
563
+ //#region utils/toCartesian3.d.ts
564
+ /**
565
+ * Converts position to a coordinate point in the Cartesian coordinate system
566
+ *
567
+ * @param position Position information, which can be a Cartesian coordinate point (Cartesian3), a geographic coordinate point (Cartographic), an array, or an object containing WGS84 latitude, longitude, and height information
568
+ * @returns The converted Cartesian coordinate point. If the input parameter is invalid, undefined is returned
569
+ */
570
+ declare function toCartesian3(position?: CommonCoord): Cartesian3 | undefined;
571
+ //# sourceMappingURL=toCartesian3.d.ts.map
572
+ //#endregion
573
+ //#region utils/toCartographic.d.ts
574
+ /**
575
+ * Converts a position to a Cartographic coordinate point
576
+ *
577
+ * @param position Position information, which can be a Cartesian3 coordinate point, a Cartographic coordinate point, an array, or an object containing WGS84 longitude, latitude, and height information
578
+ * @returns The converted Cartographic coordinate point, or undefined if the input parameter is invalid
579
+ */
580
+ declare function toCartographic(position?: CommonCoord): Cartographic | undefined;
581
+ //# sourceMappingURL=toCartographic.d.ts.map
582
+ //#endregion
583
+ //#region utils/toCoord.d.ts
584
+ interface ToCoordOptions<T extends 'Array' | 'Object', Alt extends boolean> {
585
+ /**
586
+ * Return type
587
+ * @default 'Array'
588
+ */
589
+ type?: T;
590
+ /**
591
+ * Whether to return altitude information
592
+ */
593
+ alt?: Alt;
594
+ }
595
+ type ToCoordReturn<T extends 'Array' | 'Object', Alt extends boolean> = T extends 'Array' ? Alt extends true ? CoordArray_ALT : CoordArray : Alt extends true ? CoordObject_ALT : CoordObject;
596
+ /**
597
+ * Converts coordinates to an array or object in the specified format.
598
+ *
599
+ * @param position The coordinate to be converted, which can be a Cartesian3, Cartographic, array, or object.
600
+ * @param options Conversion options, including conversion type and whether to include altitude information.
601
+ * @returns The converted coordinate, which may be an array or object. If the input position is empty, undefined is returned.
602
+ *
603
+ * @template T Conversion type, optional values are 'Array' or 'Object', @default 'Array'.
604
+ * @template Alt Whether to include altitude information, default is false
605
+ */
606
+ declare function toCoord<T extends 'Array' | 'Object' = 'Array', Alt extends boolean = false>(position?: CommonCoord, options?: ToCoordOptions<T, Alt>): ToCoordReturn<T, Alt> | undefined;
607
+ //#endregion
608
+ //#region utils/tryRun.d.ts
609
+ /**
610
+ * Safely execute the provided function without throwing errors,
611
+ * essentially a simple wrapper around a `try...catch...` block
612
+ */
613
+ declare function tryRun<T extends AnyFn>(fn: T): T;
614
+ //# sourceMappingURL=tryRun.d.ts.map
615
+ //#endregion
616
+ //#region useDataSource/index.d.ts
617
+ interface UseDataSourceOptions {
618
+ /**
619
+ * The collection of DataSource to be added
620
+ * @default useViewer().value.dataSources
621
+ */
622
+ collection?: DataSourceCollection;
623
+ /**
624
+ * default value of `isActive`
625
+ * @default true
626
+ */
627
+ isActive?: MaybeRefOrGetter<boolean>;
628
+ /**
629
+ * Ref passed to receive the updated of async evaluation
630
+ */
631
+ evaluating?: Ref<boolean>;
632
+ /**
633
+ * The second parameter passed to the `remove` function
634
+ *
635
+ * `dataSources.remove(dataSource,destroyOnRemove)`
636
+ */
637
+ destroyOnRemove?: MaybeRefOrGetter<boolean>;
638
+ }
639
+ /**
640
+ * Add `DataSource` to the `DataSourceCollection`, automatically update when the data changes, and destroy the side effects caused by the previous `DataSource`.
641
+ *
642
+ * overload1: Parameter supports passing in a single value.
643
+ *
644
+ * @param dataSource The `DataSource` to added
645
+ * @param options additional options
646
+ *
647
+ * @returns computedRef of the `DataSource`
648
+ *
649
+ * @overload
650
+ */
651
+ declare function useDataSource<T extends CesiumDataSource = CesiumDataSource>(dataSource?: MaybeRefOrAsyncGetter<T | undefined>, options?: UseDataSourceOptions): ComputedRef<T | undefined>;
652
+ /**
653
+ * Add `DataSource` to the `DataSourceCollection`, automatically update when the data changes, and destroy the side effects caused by the previous `DataSource`.
654
+ *
655
+ * overload1: Parameter supports passing in an array.
656
+ *
657
+ * @param dataSources The list of `DataSource` to added
658
+ * @param options additional options
659
+ *
660
+ * @returns computedRef of the `DataSource`
661
+ *
662
+ * @overload
663
+ */
664
+ declare function useDataSource<T extends CesiumDataSource = CesiumDataSource>(dataSources?: MaybeRefOrAsyncGetter<T[] | undefined>, options?: UseDataSourceOptions): ComputedRef<T[] | undefined>;
665
+ //# sourceMappingURL=index.d.ts.map
666
+ //#endregion
667
+ //#region useDataSourceScope/index.d.ts
668
+ interface UseDataSourceScopeOptions {
669
+ /**
670
+ * The collection of DataSource to be added
671
+ * @default useViewer().value.dataSources
672
+ */
673
+ collection?: MaybeRefOrGetter<DataSourceCollection>;
674
+ /**
675
+ * The second parameter passed to the `remove` function
676
+ *
677
+ * `dataSources.remove(dataSource,destroyOnRemove)`
678
+ */
679
+ destroyOnRemove?: boolean;
680
+ }
681
+ interface UseDataSourceScopeRetrun {
682
+ /**
683
+ * A `Set` for storing SideEffect instance,
684
+ * which is encapsulated using `ShallowReactive` to provide Vue's reactive functionality
685
+ */
686
+ scope: Readonly<ShallowReactive<Set<CesiumDataSource>>>;
687
+ /**
688
+ * Add SideEffect instance
689
+ */
690
+ add: <T extends CesiumDataSource>(dataSource: T) => Promise<T>;
691
+ /**
692
+ * Remove specified SideEffect instance
693
+ */
694
+ remove: (dataSource: CesiumDataSource, destroy?: boolean) => boolean;
695
+ /**
696
+ * Remove all SideEffect instance that meets the specified criteria
697
+ */
698
+ removeWhere: (predicate: EffcetRemovePredicate<CesiumDataSource>, destroy?: boolean) => void;
699
+ /**
700
+ * Remove all SideEffect instance within current scope
701
+ */
702
+ removeScope: (destroy?: boolean) => void;
703
+ }
704
+ /**
705
+ * // Scope the SideEffects of `DataSourceCollection` operations and automatically remove them when unmounted
706
+ */
707
+ declare function useDataSourceScope(options?: UseDataSourceScopeOptions): UseDataSourceScopeRetrun;
708
+ //# sourceMappingURL=index.d.ts.map
709
+ //#endregion
710
+ //#region useElementOverlay/index.d.ts
711
+ interface UseElementOverlayOptions {
712
+ /**
713
+ * Horizontal origin of the target element
714
+ * @default `center`
715
+ */
716
+ horizontal?: MaybeRefOrGetter<'center' | 'left' | 'right' | undefined>;
717
+ /**
718
+ * Vertical origin of the target element
719
+ * @default `bottom`
720
+ */
721
+ vertical?: MaybeRefOrGetter<'center' | 'bottom' | 'top' | undefined>;
722
+ /**
723
+ * Pixel offset presented by the target element
724
+ * @default {x:0,y:0}
725
+ */
726
+ offset?: MaybeRefOrGetter<{
727
+ x?: number;
728
+ y?: number;
729
+ } | undefined>;
730
+ /**
731
+ * The reference element for calculating the position of the target element
732
+ * - `true` refer to the browser viewport
733
+ * - `false` refer to the Cesium canvas
734
+ */
735
+ referenceWindow?: MaybeRefOrGetter<boolean>;
736
+ /**
737
+ * Whether to apply style to the target element
738
+ * @default true
739
+ */
740
+ applyStyle?: MaybeRefOrGetter<boolean>;
741
+ }
742
+ interface UseElementOverlayRetrun {
743
+ /**
744
+ * Calculation result of the target element's horizontal direction
745
+ */
746
+ x: ComputedRef<number>;
747
+ /**
748
+ * Calculation result of the target element's vertical direction
749
+ */
750
+ y: ComputedRef<number>;
751
+ /**
752
+ * Calculation `css` of the target element
753
+ */
754
+ style: ComputedRef<{
755
+ left: string;
756
+ top: string;
757
+ }>;
758
+ }
759
+ /**
760
+ * Cesium HtmlElement Overlay
761
+ */
762
+ declare function useElementOverlay(target?: MaybeComputedElementRef, position?: MaybeRefOrGetter<CommonCoord | undefined>, options?: UseElementOverlayOptions): UseElementOverlayRetrun;
763
+ //# sourceMappingURL=index.d.ts.map
764
+ //#endregion
765
+ //#region useEntity/index.d.ts
766
+ interface UseEntityOptions {
767
+ /**
768
+ * The collection of Entity to be added
769
+ * @default useViewer().value.entities
770
+ */
771
+ collection?: EntityCollection;
772
+ /**
773
+ * default value of `isActive`
774
+ * @default true
775
+ */
776
+ isActive?: MaybeRefOrGetter<boolean>;
777
+ /**
778
+ * Ref passed to receive the updated of async evaluation
779
+ */
780
+ evaluating?: Ref<boolean>;
781
+ }
782
+ /**
783
+ * Add `Entity` to the `EntityCollection`, automatically update when the data changes, and destroy the side effects caused by the previous `Entity`.
784
+ *
785
+ * overLoaded1: Parameter supports passing in a single value.
786
+ */
787
+ declare function useEntity<T extends Entity = Entity>(entity?: MaybeRefOrAsyncGetter<T | undefined>, options?: UseEntityOptions): ComputedRef<T | undefined>;
788
+ /**
789
+ * Add `Entity` to the `EntityCollection`, automatically update when the data changes, and destroy the side effects caused by the previous `Entity`.
790
+ *
791
+ * overLoaded2: Parameter supports passing in an array.
792
+ */
793
+ declare function useEntity<T extends Entity = Entity>(entities?: MaybeRefOrAsyncGetter<Array<T | undefined>>, options?: UseEntityOptions): ComputedRef<T[] | undefined>;
794
+ //# sourceMappingURL=index.d.ts.map
795
+ //#endregion
796
+ //#region useEntityScope/index.d.ts
797
+ interface UseEntityScopeOptions {
798
+ /**
799
+ * The collection of Entity to be added
800
+ * @default useViewer().value.entities
801
+ */
802
+ collection?: MaybeRefOrGetter<EntityCollection>;
803
+ }
804
+ interface UseEntityScopeRetrun {
805
+ /**
806
+ * A `Set` for storing SideEffect instance,
807
+ * which is encapsulated using `ShallowReactive` to provide Vue's reactive functionality
808
+ */
809
+ scope: Readonly<ShallowReactive<Set<Entity>>>;
810
+ /**
811
+ * Add SideEffect instance
812
+ */
813
+ add: <T extends Entity>(entity: T) => T;
814
+ /**
815
+ * Remove specified SideEffect instance
816
+ */
817
+ remove: (entity: Entity, destroy?: boolean) => boolean;
818
+ /**
819
+ * Remove all SideEffect instance that meets the specified criteria
820
+ */
821
+ removeWhere: (predicate: EffcetRemovePredicate<Entity>, destroy?: boolean) => void;
822
+ /**
823
+ * Remove all SideEffect instance within current scope
824
+ */
825
+ removeScope: (destroy?: boolean) => void;
826
+ }
827
+ /**
828
+ * Make `add` and `remove` operations of `EntityCollection` scoped,
829
+ * automatically remove `Entity` instance when component is unmounted.
830
+ */
831
+ declare function useEntityScope(options?: UseEntityScopeOptions): UseEntityScopeRetrun;
832
+ //# sourceMappingURL=index.d.ts.map
833
+ //#endregion
834
+ //#region useGraphicEvent/useDrag.d.ts
835
+ /**
836
+ * Parameters for graphic drag events
837
+ */
838
+ interface GraphicDragEvent {
839
+ /**
840
+ * Event of the motion event
841
+ */
842
+ event: ScreenSpaceEventHandler.MotionEvent;
843
+ /**
844
+ * The graphic object picked by `scene.pick`
845
+ */
846
+ pick: any;
847
+ /**
848
+ * Whether the graphic is currently being dragged.
849
+ */
850
+ dragging: boolean;
851
+ /**
852
+ * Whether to lock the camera, Will automatically resume when you end dragging.
853
+ */
854
+ lockCamera: () => void;
855
+ }
856
+ /**
857
+ * Use graphic drag events with ease, and remove listener automatically on unmounted.
858
+ */
859
+ //#endregion
860
+ //#region useGraphicEvent/useHover.d.ts
861
+ /**
862
+ * Parameters for graphic hover events
863
+ */
864
+ interface GraphicHoverEvent {
865
+ /**
866
+ * Event of the motion event
867
+ */
868
+ event: ScreenSpaceEventHandler.MotionEvent;
869
+ /**
870
+ * The graphic object picked by `scene.pick`
871
+ */
872
+ pick: any;
873
+ /**
874
+ * Whether the graphic is currently being hoverged. Returns `true` continuously while hoverging, and `false` once it ends.
875
+ */
876
+ hovering: boolean;
877
+ }
878
+ /**
879
+ * Use graphic hover events with ease, and remove listener automatically on unmounted.
880
+ */
881
+ //#endregion
882
+ //#region useGraphicEvent/usePositioned.d.ts
883
+ type PositionedEventType = 'LEFT_DOWN' | 'LEFT_UP' | 'LEFT_CLICK' | 'LEFT_DOUBLE_CLICK' | 'RIGHT_DOWN' | 'RIGHT_UP' | 'RIGHT_CLICK' | 'MIDDLE_DOWN' | 'MIDDLE_UP' | 'MIDDLE_CLICK';
884
+ /**
885
+ * Parameters for graphics click related events
886
+ */
887
+ interface GraphicPositionedEvent {
888
+ /**
889
+ * Event of the picked area
890
+ */
891
+ event: ScreenSpaceEventHandler.PositionedEvent;
892
+ /**
893
+ * The graphic object picked by `scene.pick`
894
+ */
895
+ pick: any;
896
+ }
897
+ //#endregion
898
+ //#region useGraphicEvent/index.d.ts
899
+ type CesiumGraphic = Entity | any;
900
+ type GraphicEventType = PositionedEventType | 'HOVER' | 'DRAG';
901
+ type GraphicEventListener<T extends GraphicEventType> = T extends 'DRAG' ? (event: GraphicDragEvent) => void : T extends 'HOVER' ? (event: GraphicHoverEvent) => void : (event: GraphicPositionedEvent) => void;
902
+ type RemoveGraphicEventFn = () => void;
903
+ interface AddGraphicEventOptions {
904
+ /**
905
+ * The cursor style to use when the mouse is over the graphic.
906
+ * @default 'pointer'
907
+ */
908
+ cursor?: Nullable<string> | ((event: GraphicHoverEvent) => Nullable<string>);
909
+ /**
910
+ * The cursor style to use when the mouse is over the graphic during a drag operation.
911
+ * @default 'crosshair'
912
+ */
913
+ dragCursor?: Nullable<string> | ((event: GraphicHoverEvent) => Nullable<string>);
914
+ }
915
+ interface UseGraphicEventRetrun {
916
+ /**
917
+ * Add a graphic event listener and return a function to remove it.
918
+ * @param graphic - The graphic object, 'global' indicates the global graphic object.
919
+ * @param type - The event type, 'all' indicates clearing all events.
920
+ * @param listener - The event listener function.
921
+ */
922
+ addGraphicEvent: <T extends GraphicEventType>(graphic: CesiumGraphic | 'global', type: T, listener: GraphicEventListener<T>, options?: AddGraphicEventOptions) => RemoveGraphicEventFn;
923
+ /**
924
+ * Remove a graphic event listener.
925
+ * @param graphic - The graphic object, 'global' indicates the global graphic object.
926
+ * @param type - The event type, 'all' indicates clearing all events.
927
+ * @param listener - The event listener function.
928
+ */
929
+ removeGraphicEvent: <T extends GraphicEventType>(graphic: CesiumGraphic | 'global', type: T, listener: GraphicEventListener<T>) => void;
930
+ /**
931
+ * Clear graphic event listeners.
932
+ * @param graphic - The graphic object.
933
+ * @param type - The event type, 'all' indicates clearing all events.
934
+ */
935
+ clearGraphicEvent: (graphic: CesiumGraphic | 'global', type: GraphicEventType | 'all') => void;
936
+ }
937
+ /**
938
+ * Handle graphic event listeners and cursor styles for Cesium graphics.
939
+ * You don't need to overly worry about memory leaks from the function, as it automatically cleans up internally.
940
+ */
941
+ declare function useGraphicEvent(): UseGraphicEventRetrun;
942
+ //# sourceMappingURL=index.d.ts.map
943
+ //#endregion
944
+ //#region useImageryLayer/index.d.ts
945
+ interface UseImageryLayerOptions {
946
+ /**
947
+ * The collection of ImageryLayer to be added
948
+ * @default useViewer().value.imageryLayers
949
+ */
950
+ collection?: ImageryLayerCollection;
951
+ /**
952
+ * default value of `isActive`
953
+ * @default true
954
+ */
955
+ isActive?: MaybeRefOrGetter<boolean>;
956
+ /**
957
+ * Ref passed to receive the updated of async evaluation
958
+ */
959
+ evaluating?: Ref<boolean>;
960
+ /**
961
+ * The second parameter passed to the `remove` function
962
+ *
963
+ * `imageryLayers.remove(layer,destroyOnRemove)`
964
+ */
965
+ destroyOnRemove?: MaybeRefOrGetter<boolean>;
966
+ }
967
+ /**
968
+ * Add `ImageryLayer` to the `ImageryLayerCollection`, automatically update when the data changes, and destroy the side effects caused by the previous `ImageryLayer`.
969
+ *
970
+ * overLoaded1: Parameter supports passing in a single value.
971
+ */
972
+ declare function useImageryLayer<T extends ImageryLayer = ImageryLayer>(layer?: MaybeRefOrAsyncGetter<T | undefined>, options?: UseImageryLayerOptions): ComputedRef<T | undefined>;
973
+ /**
974
+ * Add `ImageryLayer` to the `ImageryLayerCollection`, automatically update when the data changes, and destroy the side effects caused by the previous `ImageryLayer`.
975
+ *
976
+ * overLoaded2: Parameter supports passing in an array.
977
+ */
978
+ declare function useImageryLayer<T extends ImageryLayer = ImageryLayer>(layers?: MaybeRefOrAsyncGetter<Array<T | undefined>>, options?: UseImageryLayerOptions): ComputedRef<T[] | undefined>;
979
+ //# sourceMappingURL=index.d.ts.map
980
+ //#endregion
981
+ //#region useImageryLayerScope/index.d.ts
982
+ interface UseImageryLayerScopeOptions {
983
+ /**
984
+ * The collection of ImageryLayer to be added
985
+ * @default useViewer().value.imageryLayers
986
+ */
987
+ collection?: MaybeRefOrGetter<ImageryLayerCollection>;
988
+ /**
989
+ * The second parameter passed to the `remove` function
990
+ *
991
+ * `imageryLayers.remove(imageryLayer,destroyOnRemove)`
992
+ */
993
+ destroyOnRemove?: boolean;
994
+ }
995
+ interface UseImageryLayerScopeRetrun {
996
+ /**
997
+ * A `Set` for storing SideEffect instance,
998
+ * which is encapsulated using `ShallowReactive` to provide Vue's reactive functionality
999
+ */
1000
+ scope: Readonly<ShallowReactive<Set<ImageryLayer>>>;
1001
+ /**
1002
+ * Add SideEffect instance
1003
+ */
1004
+ add: <T extends ImageryLayer>(imageryLayer: T) => T;
1005
+ /**
1006
+ * Remove specified SideEffect instance
1007
+ */
1008
+ remove: (imageryLayer: ImageryLayer, destroy?: boolean) => boolean;
1009
+ /**
1010
+ * Remove all SideEffect instance that meets the specified criteria
1011
+ */
1012
+ removeWhere: (predicate: EffcetRemovePredicate<ImageryLayer>, destroy?: boolean) => void;
1013
+ /**
1014
+ * Remove all SideEffect instance within current scope
1015
+ */
1016
+ removeScope: (destroy?: boolean) => void;
1017
+ }
1018
+ /**
1019
+ * Make `add` and `remove` operations of `ImageryLayerCollection` scoped,
1020
+ * automatically remove `ImageryLayer` instance when component is unmounted.
1021
+ */
1022
+ declare function useImageryLayerScope(options?: UseImageryLayerScopeOptions): UseImageryLayerScopeRetrun;
1023
+ //# sourceMappingURL=index.d.ts.map
1024
+ //#endregion
1025
+ //#region usePostProcessStage/index.d.ts
1026
+ interface UsePostProcessStageOptions {
1027
+ /**
1028
+ * The collection of PostProcessStage to be added
1029
+ * @default useViewer().scene.postProcessStages
1030
+ */
1031
+ collection?: PostProcessStageCollection;
1032
+ /**
1033
+ * default value of `isActive`
1034
+ * @default true
1035
+ */
1036
+ isActive?: MaybeRefOrGetter<boolean>;
1037
+ /**
1038
+ * Ref passed to receive the updated of async evaluation
1039
+ */
1040
+ evaluating?: Ref<boolean>;
1041
+ }
1042
+ /**
1043
+ * Add `PostProcessStage` to the `PostProcessStageCollection`, automatically update when the data changes, and destroy the side effects caused by the previous `PostProcessStage`.
1044
+ *
1045
+ * overLoaded1: Parameter supports passing in a single value.
1046
+ */
1047
+ declare function usePostProcessStage<T extends PostProcessStage = PostProcessStage>(stage?: MaybeRefOrAsyncGetter<T | undefined>, options?: UsePostProcessStageOptions): ComputedRef<T | undefined>;
1048
+ /**
1049
+ * Add `PostProcessStage` to the `PostProcessStageCollection`, automatically update when the data changes, and destroy the side effects caused by the previous `PostProcessStage`.
1050
+ *
1051
+ * overLoaded2: Parameter supports passing in an array.
1052
+ */
1053
+ declare function usePostProcessStage<T extends PostProcessStage = PostProcessStage>(stages?: MaybeRefOrAsyncGetter<Array<T | undefined>>, options?: UsePostProcessStageOptions): ComputedRef<T[] | undefined>;
1054
+ //# sourceMappingURL=index.d.ts.map
1055
+ //#endregion
1056
+ //#region usePostProcessStageScope/index.d.ts
1057
+ interface UsePostProcessStageScopeOptions {
1058
+ /**
1059
+ * The collection of PostProcessStage to be added
1060
+ * @default useViewer().value.postProcessStages
1061
+ */
1062
+ collection?: MaybeRefOrGetter<PostProcessStageCollection>;
1063
+ }
1064
+ interface UsePostProcessStageScopeRetrun {
1065
+ /**
1066
+ * A `Set` for storing SideEffect instance,
1067
+ * which is encapsulated using `ShallowReactive` to provide Vue's reactive functionality
1068
+ */
1069
+ scope: Readonly<ShallowReactive<Set<PostProcessStage>>>;
1070
+ /**
1071
+ * Add SideEffect instance
1072
+ */
1073
+ add: <T extends PostProcessStage>(postProcessStage: T) => T;
1074
+ /**
1075
+ * Remove specified SideEffect instance
1076
+ */
1077
+ remove: (postProcessStage: PostProcessStage, destroy?: boolean) => boolean;
1078
+ /**
1079
+ * Remove all SideEffect instance that meets the specified criteria
1080
+ */
1081
+ removeWhere: (predicate: EffcetRemovePredicate<PostProcessStage>, destroy?: boolean) => void;
1082
+ /**
1083
+ * Remove all SideEffect instance within current scope
1084
+ */
1085
+ removeScope: (destroy?: boolean) => void;
1086
+ }
1087
+ /**
1088
+ * Make `add` and `remove` operations of `PostProcessStageCollection` scoped,
1089
+ * automatically remove `PostProcessStage` instance when component is unmounted.
1090
+ */
1091
+ declare function usePostProcessStageScope(options?: UsePostProcessStageScopeOptions): UsePostProcessStageScopeRetrun;
1092
+ //# sourceMappingURL=index.d.ts.map
1093
+ //#endregion
1094
+ //#region usePrimitive/index.d.ts
1095
+ interface UsePrimitiveOptions {
1096
+ /**
1097
+ * The collection of Primitive to be added
1098
+ * - `ground` : `useViewer().scene.groundPrimitives`
1099
+ * @default useViewer().scene.primitives
1100
+ */
1101
+ collection?: PrimitiveCollection | 'ground';
1102
+ /**
1103
+ * default value of `isActive`
1104
+ * @default true
1105
+ */
1106
+ isActive?: MaybeRefOrGetter<boolean>;
1107
+ /**
1108
+ * Ref passed to receive the updated of async evaluation
1109
+ */
1110
+ evaluating?: Ref<boolean>;
1111
+ }
1112
+ /**
1113
+ * Add `Primitive` to the `PrimitiveCollection`, automatically update when the data changes, and destroy the side effects caused by the previous `Primitive`.
1114
+ *
1115
+ * overLoaded1: Parameter supports passing in a single value.
1116
+ */
1117
+ declare function usePrimitive<T = any>(primitive?: MaybeRefOrAsyncGetter<T | undefined>, options?: UsePrimitiveOptions): ComputedRef<T | undefined>;
1118
+ /**
1119
+ * Add `Primitive` to the `PrimitiveCollection`, automatically update when the data changes, and destroy the side effects caused by the previous `Primitive`.
1120
+ *
1121
+ * overLoaded2: Parameter supports passing in an array.
1122
+ */
1123
+ declare function usePrimitive<T = any>(primitives?: MaybeRefOrAsyncGetter<Array<T | undefined>>, options?: UsePrimitiveOptions): ComputedRef<T[] | undefined>;
1124
+ //# sourceMappingURL=index.d.ts.map
1125
+ //#endregion
1126
+ //#region usePrimitiveScope/index.d.ts
1127
+ interface UsePrimitiveScopeOptions {
1128
+ /**
1129
+ * The collection of Primitive to be added
1130
+ * @default useViewer().value.scene.primitives
1131
+ */
1132
+ collection?: MaybeRefOrGetter<PrimitiveCollection>;
1133
+ }
1134
+ interface UsePrimitiveScopeRetrun {
1135
+ /**
1136
+ * A `Set` for storing SideEffect instance,
1137
+ * which is encapsulated using `ShallowReactive` to provide Vue's reactive functionality
1138
+ */
1139
+ scope: Readonly<ShallowReactive<Set<any>>>;
1140
+ /**
1141
+ * Add SideEffect instance
1142
+ */
1143
+ add: <T>(primitive: T) => T;
1144
+ /**
1145
+ * Remove specified SideEffect instance
1146
+ */
1147
+ remove: (primitive: any, destroy?: boolean) => boolean;
1148
+ /**
1149
+ * Remove all SideEffect instance that meets the specified criteria
1150
+ */
1151
+ removeWhere: (predicate: EffcetRemovePredicate<any>, destroy?: boolean) => void;
1152
+ /**
1153
+ * Remove all SideEffect instance within current scope
1154
+ */
1155
+ removeScope: (destroy?: boolean) => void;
1156
+ }
1157
+ /**
1158
+ * Make `add` and `remove` operations of `PrimitiveCollection` scoped,
1159
+ * automatically remove `Primitive` instance when component is unmounted.
1160
+ */
1161
+ declare function usePrimitiveScope(options?: UsePrimitiveScopeOptions): UsePrimitiveScopeRetrun;
1162
+ //# sourceMappingURL=index.d.ts.map
1163
+ //#endregion
1164
+ //#region useScaleBar/index.d.ts
1165
+ interface UseScaleBarOptions {
1166
+ /**
1167
+ * The maximum width of the scale (px)
1168
+ * @default 80
1169
+ */
1170
+ maxPixel?: MaybeRefOrGetter<number>;
1171
+ /**
1172
+ * Throttled delay duration (ms)
1173
+ * @default 8
1174
+ */
1175
+ delay?: number;
1176
+ }
1177
+ interface UseScaleBarRetrun {
1178
+ /**
1179
+ * The actual distance of a single pixel in the current canvas
1180
+ */
1181
+ pixelDistance: Readonly<Ref<number | undefined>>;
1182
+ /**
1183
+ * The width of the scale.(px)
1184
+ */
1185
+ width: Readonly<Ref<number>>;
1186
+ /**
1187
+ * The actual distance corresponding to the width of the scale (m)
1188
+ */
1189
+ distance: Readonly<Ref<number | undefined>>;
1190
+ /**
1191
+ * Formatted content of distance.
1192
+ * eg. 100m,100km
1193
+ */
1194
+ distanceText: Readonly<Ref<string | undefined>>;
1195
+ }
1196
+ /**
1197
+ * Reactive generation of scale bars
1198
+ */
1199
+ declare function useScaleBar(options?: UseScaleBarOptions): UseScaleBarRetrun;
1200
+ //# sourceMappingURL=index.d.ts.map
1201
+ //#endregion
1202
+ //#region useSceneDrillPick/index.d.ts
1203
+ interface UseSceneDrillPickOptions {
1204
+ /**
1205
+ * Whether to activate the pick function.
1206
+ * @default true
1207
+ */
1208
+ isActive?: MaybeRefOrGetter<boolean | undefined>;
1209
+ /**
1210
+ * Throttled sampling (ms)
1211
+ * @default 8
1212
+ */
1213
+ throttled?: number;
1214
+ /**
1215
+ * If supplied, stop drilling after collecting this many picks.
1216
+ */
1217
+ limit?: MaybeRefOrGetter<number | undefined>;
1218
+ /**
1219
+ * The width of the pick rectangle.
1220
+ * @default 3
1221
+ */
1222
+ width?: MaybeRefOrGetter<number | undefined>;
1223
+ /**
1224
+ * The height of the pick rectangle.
1225
+ * @default 3
1226
+ */
1227
+ height?: MaybeRefOrGetter<number | undefined>;
1228
+ }
1229
+ /**
1230
+ * Uses the `scene.drillPick` function to perform screen point picking,
1231
+ * return a computed property containing the pick result, or undefined if no object is picked.
1232
+ *
1233
+ * @param windowPosition The screen coordinates of the pick point.
1234
+ */
1235
+ declare function useSceneDrillPick(windowPosition: MaybeRefOrGetter<Cartesian2 | undefined>, options?: UseSceneDrillPickOptions): ComputedRef<any[] | undefined>;
1236
+ //# sourceMappingURL=index.d.ts.map
1237
+ //#endregion
1238
+ //#region useScenePick/index.d.ts
1239
+ interface UseScenePickOptions {
1240
+ /**
1241
+ * Whether to active the event listener.
1242
+ * @default true
1243
+ */
1244
+ isActive?: MaybeRefOrGetter<boolean>;
1245
+ /**
1246
+ * Throttled sampling (ms)
1247
+ * @default 8
1248
+ */
1249
+ throttled?: number;
1250
+ /**
1251
+ * The width of the pick rectangle.
1252
+ * @default 3
1253
+ */
1254
+ width?: MaybeRefOrGetter<number | undefined>;
1255
+ /**
1256
+ * The height of the pick rectangle.
1257
+ * @default 3
1258
+ */
1259
+ height?: MaybeRefOrGetter<number | undefined>;
1260
+ }
1261
+ /**
1262
+ * Uses the `scene.pick` function in Cesium's Scene object to perform screen point picking,
1263
+ * return a computed property containing the pick result, or undefined if no object is picked.
1264
+ *
1265
+ * @param windowPosition The screen coordinates of the pick point.
1266
+ */
1267
+ declare function useScenePick(windowPosition: MaybeRefOrGetter<Cartesian2 | undefined>, options?: UseScenePickOptions): Readonly<ShallowRef<any | undefined>>;
1268
+ //# sourceMappingURL=index.d.ts.map
1269
+ //#endregion
1270
+ //#region useScreenSpaceEventHandler/index.d.ts
1271
+ type ScreenSpaceEvent<T extends ScreenSpaceEventType> = {
1272
+ [ScreenSpaceEventType.LEFT_DOWN]: ScreenSpaceEventHandler.PositionedEvent;
1273
+ [ScreenSpaceEventType.LEFT_UP]: ScreenSpaceEventHandler.PositionedEvent;
1274
+ [ScreenSpaceEventType.LEFT_CLICK]: ScreenSpaceEventHandler.PositionedEvent;
1275
+ [ScreenSpaceEventType.LEFT_DOUBLE_CLICK]: ScreenSpaceEventHandler.PositionedEvent;
1276
+ [ScreenSpaceEventType.RIGHT_DOWN]: ScreenSpaceEventHandler.PositionedEvent;
1277
+ [ScreenSpaceEventType.RIGHT_UP]: ScreenSpaceEventHandler.PositionedEvent;
1278
+ [ScreenSpaceEventType.RIGHT_CLICK]: ScreenSpaceEventHandler.PositionedEvent;
1279
+ [ScreenSpaceEventType.MIDDLE_DOWN]: ScreenSpaceEventHandler.PositionedEvent;
1280
+ [ScreenSpaceEventType.MIDDLE_UP]: ScreenSpaceEventHandler.PositionedEvent;
1281
+ [ScreenSpaceEventType.MIDDLE_CLICK]: ScreenSpaceEventHandler.PositionedEvent;
1282
+ [ScreenSpaceEventType.MOUSE_MOVE]: ScreenSpaceEventHandler.MotionEvent;
1283
+ [ScreenSpaceEventType.WHEEL]: number;
1284
+ [ScreenSpaceEventType.PINCH_START]: ScreenSpaceEventHandler.TwoPointEvent;
1285
+ [ScreenSpaceEventType.PINCH_END]: ScreenSpaceEventHandler.TwoPointEvent;
1286
+ [ScreenSpaceEventType.PINCH_MOVE]: ScreenSpaceEventHandler.TwoPointMotionEvent;
1287
+ }[T];
1288
+ interface UseScreenSpaceEventHandlerOptions {
1289
+ /**
1290
+ * Modifier key
1291
+ */
1292
+ modifier?: MaybeRefOrGetter<KeyboardEventModifier | undefined>;
1293
+ /**
1294
+ * Whether to active the event listener.
1295
+ * @default true
1296
+ */
1297
+ isActive?: MaybeRefOrGetter<boolean>;
1298
+ }
1299
+ /**
1300
+ * Easily use the `ScreenSpaceEventHandler`,
1301
+ * when the dependent data changes or the component is unmounted,
1302
+ * the listener function will automatically reload or destroy.
1303
+ *
1304
+ * @param type Types of mouse event
1305
+ * @param inputAction Callback function for listening
1306
+ */
1307
+ declare function useScreenSpaceEventHandler<T extends ScreenSpaceEventType>(type?: MaybeRefOrGetter<T | undefined>, inputAction?: (event: ScreenSpaceEvent<T>) => any, options?: UseScreenSpaceEventHandlerOptions): WatchStopHandle;
1308
+ //# sourceMappingURL=index.d.ts.map
1309
+ //#endregion
1310
+ //#region useViewer/index.d.ts
1311
+ /**
1312
+ * Obtain the `Viewer` instance injected through `createViewer` in the current component or its ancestor components.
1313
+ *
1314
+ * note:
1315
+ * - If `createViewer` and `useViewer` are called in the same component, the `Viewer` instance injected by `createViewer` will be used preferentially.
1316
+ * - When calling `createViewer` and `useViewer` in the same component, `createViewer` should be called before `useViewer`.
1317
+ */
1318
+ declare function useViewer(): Readonly<ShallowRef<Viewer | undefined>>;
1319
+ //# sourceMappingURL=index.d.ts.map
1320
+
1321
+ //#endregion
1322
+ export { AddGraphicEventOptions, AnyFn, ArgsFn, ArrayDiffRetrun, BasicType, CesiumDataSource, CesiumGraphic, CesiumMaterial, CesiumMaterialConstructorOptions, CesiumMaterialFabricOptions, CesiumMaterialProperty, CommonCoord, CoordArray, CoordArray_ALT, CoordObject, CoordObject_ALT, CreateCesiumAttributeOptions, CreateCesiumPropertyOptions, DMSCoord, EffcetRemovePredicate, GraphicEventListener, GraphicEventType, MaybeAsyncGetter, MaybePromise, MaybeProperty, MaybePropertyOrGetter, MaybeRefOrAsyncGetter, Nullable, OnAsyncGetterCancel, PropertyCallback, RemoveGraphicEventFn, ScreenSpaceEvent, ThrottleCallback, ToCoordReturn, ToPromiseValueOptions, UseCameraStateOptions, UseCameraStateRetrun, UseCesiumEventListenerOptions, UseCesiumFpsOptions, UseCesiumFpsRetrun, UseCollectionScopeReturn, UseDataSourceOptions, UseDataSourceScopeOptions, UseDataSourceScopeRetrun, UseElementOverlayOptions, UseElementOverlayRetrun, UseEntityOptions, UseEntityScopeOptions, UseEntityScopeRetrun, UseGraphicEventRetrun, UseImageryLayerOptions, UseImageryLayerScopeOptions, UseImageryLayerScopeRetrun, UsePostProcessStageOptions, UsePostProcessStageScopeOptions, UsePostProcessStageScopeRetrun, UsePrimitiveOptions, UsePrimitiveScopeOptions, UsePrimitiveScopeRetrun, UseScaleBarOptions, UseScaleBarRetrun, UseSceneDrillPickOptions, UseScenePickOptions, UseScreenSpaceEventHandlerOptions, addMaterialCache, arrayDiff, assertError, canvasCoordToCartesian, cartesianToCanvasCoord, cesiumEquals, createCesiumAttribute, createCesiumProperty, createPropertyField, createViewer, degreesToDms, dmsDecode, dmsEncode, dmsToDegrees, getMaterialCache, isArray, isBase64, isBoolean, isCesiumConstant, isDef, isElement, isFunction, isNumber, isObject, isPromise$1 as isPromise, isProperty, isString, isWindow, pickHitGraphic, resolvePick, throttle, toCartesian3, toCartographic, toCoord, toPromiseValue, toProperty, toPropertyValue, tryRun, useCameraState, useCesiumEventListener, useCesiumFps, useCollectionScope, useDataSource, useDataSourceScope, useElementOverlay, useEntity, useEntityScope, useGraphicEvent, useImageryLayer, useImageryLayerScope, usePostProcessStage, usePostProcessStageScope, usePrimitive, usePrimitiveScope, useScaleBar, useSceneDrillPick, useScenePick, useScreenSpaceEventHandler, useViewer };
1323
+ //# sourceMappingURL=index.d.cts.map