vesium 1.0.1-beta.50 → 1.0.1-beta.51

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