vesium 1.0.1-beta.52 → 1.0.1-beta.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.cjs +151 -723
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +54 -555
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +54 -555
- package/dist/index.d.mts.map +1 -1
- package/dist/index.iife.js +896 -1472
- package/dist/index.iife.js.map +1 -1
- package/dist/index.iife.min.js +1 -1
- package/dist/index.iife.min.js.map +1 -1
- package/dist/index.min.cjs +1 -1
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.mjs +1 -1
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +130 -647
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -5
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Arrayable, FunctionArgs, MaybeComputedElementRef } from "@vueuse/core";
|
|
2
|
-
import { Camera, Cartesian2, Cartesian3, Cartographic,
|
|
2
|
+
import { Camera, Cartesian2, Cartesian3, Cartographic, DataSourceCollection, Entity, EntityCollection, Event, ImageryLayer, ImageryLayerCollection, KeyboardEventModifier, PostProcessStage, PostProcessStageCollection, PostProcessStageComposite, PrimitiveCollection, Rectangle, ScreenSpaceEventHandler, ScreenSpaceEventType, Viewer } from "cesium";
|
|
3
|
+
import * as vue0 from "vue";
|
|
3
4
|
import { ComputedRef, MaybeRef, MaybeRefOrGetter, Ref, ShallowReactive, ShallowRef, WatchStopHandle } from "vue";
|
|
4
|
-
import {
|
|
5
|
+
import { CesiumDataSource, CommonCoord, Nullable } from "@vesium/shared";
|
|
6
|
+
export * from "@vesium/shared";
|
|
5
7
|
|
|
6
8
|
//#region createViewer/index.d.ts
|
|
7
9
|
|
|
@@ -25,7 +27,6 @@ declare function createViewer(viewer: MaybeRef<Viewer | undefined>): Readonly<Sh
|
|
|
25
27
|
* @returns The Viewer instance
|
|
26
28
|
*/
|
|
27
29
|
declare function createViewer(element?: MaybeComputedElementRef, options?: Viewer.ConstructorOptions): Readonly<ShallowRef<Viewer | undefined>>;
|
|
28
|
-
//# sourceMappingURL=index.d.ts.map
|
|
29
30
|
//#endregion
|
|
30
31
|
//#region toPromiseValue/index.d.ts
|
|
31
32
|
type OnAsyncGetterCancel = (onCancel: () => void) => void;
|
|
@@ -57,7 +58,6 @@ interface ToPromiseValueOptions {
|
|
|
57
58
|
* ```
|
|
58
59
|
*/
|
|
59
60
|
declare function toPromiseValue<T>(source: MaybeRefOrAsyncGetter<T>, options?: ToPromiseValueOptions): Promise<T>;
|
|
60
|
-
//# sourceMappingURL=index.d.ts.map
|
|
61
61
|
//#endregion
|
|
62
62
|
//#region useCameraState/index.d.ts
|
|
63
63
|
interface UseCameraStateOptions {
|
|
@@ -148,7 +148,6 @@ interface UseCameraStateRetrun {
|
|
|
148
148
|
* @returns Reactive camera states
|
|
149
149
|
*/
|
|
150
150
|
declare function useCameraState(options?: UseCameraStateOptions): UseCameraStateRetrun;
|
|
151
|
-
//# sourceMappingURL=index.d.ts.map
|
|
152
151
|
//#endregion
|
|
153
152
|
//#region useCesiumEventListener/index.d.ts
|
|
154
153
|
interface UseCesiumEventListenerOptions {
|
|
@@ -169,7 +168,6 @@ interface UseCesiumEventListenerOptions {
|
|
|
169
168
|
* @returns A function that can be called to remove the event listener
|
|
170
169
|
*/
|
|
171
170
|
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
171
|
//#endregion
|
|
174
172
|
//#region useCesiumFps/index.d.ts
|
|
175
173
|
interface UseCesiumFpsOptions {
|
|
@@ -195,11 +193,24 @@ interface UseCesiumFpsRetrun {
|
|
|
195
193
|
* @returns Reactive fps states
|
|
196
194
|
*/
|
|
197
195
|
declare function useCesiumFps(options?: UseCesiumFpsOptions): UseCesiumFpsRetrun;
|
|
198
|
-
//# sourceMappingURL=index.d.ts.map
|
|
199
196
|
//#endregion
|
|
200
197
|
//#region useCollectionScope/index.d.ts
|
|
201
198
|
type EffcetRemovePredicate<T> = (instance: T) => boolean;
|
|
202
|
-
interface
|
|
199
|
+
interface UseCollectionScopeOptions<T, AddArgs extends any[], RemoveArgs extends any[] = [], RemoveReturn = any> {
|
|
200
|
+
/**
|
|
201
|
+
* add SideEffect function. eg.`entites.add`
|
|
202
|
+
*/
|
|
203
|
+
addEffect: (instance: T | Promise<T>, ...args: AddArgs) => T | Promise<T>;
|
|
204
|
+
/**
|
|
205
|
+
* Clean SideEffect function. eg.`entities.remove`
|
|
206
|
+
*/
|
|
207
|
+
removeEffect: (instance: T, ...args: RemoveArgs) => RemoveReturn;
|
|
208
|
+
/**
|
|
209
|
+
* The parameters to pass for `removeScope` triggered when the component is unmounted
|
|
210
|
+
*/
|
|
211
|
+
removeScopeArgs?: RemoveArgs;
|
|
212
|
+
}
|
|
213
|
+
interface UseCollectionScopeReturn<T, AddArgs extends any[], RemoveArgs extends any[], RemoveReturn = any> {
|
|
203
214
|
/**
|
|
204
215
|
* A `Set` for storing SideEffect instance,
|
|
205
216
|
* which is encapsulated using `ShallowReactive` to provide Vue's reactive functionality
|
|
@@ -208,11 +219,11 @@ interface UseCollectionScopeReturn<isPromise extends boolean, T, AddArgs extends
|
|
|
208
219
|
/**
|
|
209
220
|
* Add SideEffect instance
|
|
210
221
|
*/
|
|
211
|
-
add: (
|
|
222
|
+
add: <R extends T | Promise<T>>(instance: R, ...args: AddArgs) => R extends Promise<infer U> ? Promise<U> : T;
|
|
212
223
|
/**
|
|
213
224
|
* Remove specified SideEffect instance
|
|
214
225
|
*/
|
|
215
|
-
remove: (
|
|
226
|
+
remove: (instance: T, ...args: RemoveArgs) => RemoveReturn;
|
|
216
227
|
/**
|
|
217
228
|
* Remove all SideEffect instance that meets the specified criteria
|
|
218
229
|
*/
|
|
@@ -225,393 +236,9 @@ interface UseCollectionScopeReturn<isPromise extends boolean, T, AddArgs extends
|
|
|
225
236
|
/**
|
|
226
237
|
* Scope the SideEffects of Cesium-related `Collection` and automatically remove them when unmounted.
|
|
227
238
|
* - 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
239
|
* @returns Contains side effect addition and removal functions
|
|
233
240
|
*/
|
|
234
|
-
declare function useCollectionScope<
|
|
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
|
|
241
|
+
declare function useCollectionScope<T, AddArgs extends any[] = any[], RemoveArgs extends any[] = any[], RemoveReturn = any>(options: UseCollectionScopeOptions<T, AddArgs, RemoveArgs, RemoveReturn>): UseCollectionScopeReturn<T, AddArgs, RemoveArgs, RemoveReturn>;
|
|
615
242
|
//#endregion
|
|
616
243
|
//#region useDataSource/index.d.ts
|
|
617
244
|
interface UseDataSourceOptions {
|
|
@@ -662,7 +289,6 @@ declare function useDataSource<T extends CesiumDataSource = CesiumDataSource>(da
|
|
|
662
289
|
* @overload
|
|
663
290
|
*/
|
|
664
291
|
declare function useDataSource<T extends CesiumDataSource = CesiumDataSource>(dataSources?: MaybeRefOrAsyncGetter<T[] | undefined>, options?: UseDataSourceOptions): ComputedRef<T[] | undefined>;
|
|
665
|
-
//# sourceMappingURL=index.d.ts.map
|
|
666
292
|
//#endregion
|
|
667
293
|
//#region useDataSourceScope/index.d.ts
|
|
668
294
|
interface UseDataSourceScopeOptions {
|
|
@@ -670,7 +296,7 @@ interface UseDataSourceScopeOptions {
|
|
|
670
296
|
* The collection of DataSource to be added
|
|
671
297
|
* @default useViewer().value.dataSources
|
|
672
298
|
*/
|
|
673
|
-
collection?: MaybeRefOrGetter<DataSourceCollection>;
|
|
299
|
+
collection?: MaybeRefOrGetter<DataSourceCollection | undefined>;
|
|
674
300
|
/**
|
|
675
301
|
* The second parameter passed to the `remove` function
|
|
676
302
|
*
|
|
@@ -678,34 +304,10 @@ interface UseDataSourceScopeOptions {
|
|
|
678
304
|
*/
|
|
679
305
|
destroyOnRemove?: boolean;
|
|
680
306
|
}
|
|
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
307
|
/**
|
|
705
|
-
*
|
|
308
|
+
* Scope the SideEffects of `DataSourceCollection` operations and automatically remove them when unmounted
|
|
706
309
|
*/
|
|
707
|
-
declare function useDataSourceScope(options?: UseDataSourceScopeOptions):
|
|
708
|
-
//# sourceMappingURL=index.d.ts.map
|
|
310
|
+
declare function useDataSourceScope(options?: UseDataSourceScopeOptions): UseCollectionScopeReturn<CesiumDataSource, any[], any[], any>;
|
|
709
311
|
//#endregion
|
|
710
312
|
//#region useElementOverlay/index.d.ts
|
|
711
313
|
interface UseElementOverlayOptions {
|
|
@@ -738,6 +340,10 @@ interface UseElementOverlayOptions {
|
|
|
738
340
|
* @default true
|
|
739
341
|
*/
|
|
740
342
|
applyStyle?: MaybeRefOrGetter<boolean>;
|
|
343
|
+
/**
|
|
344
|
+
* The position will be clamped to the ground
|
|
345
|
+
*/
|
|
346
|
+
clampToGround?: MaybeRefOrGetter<boolean>;
|
|
741
347
|
}
|
|
742
348
|
interface UseElementOverlayRetrun {
|
|
743
349
|
/**
|
|
@@ -760,7 +366,6 @@ interface UseElementOverlayRetrun {
|
|
|
760
366
|
* Cesium HtmlElement Overlay
|
|
761
367
|
*/
|
|
762
368
|
declare function useElementOverlay(target?: MaybeComputedElementRef, position?: MaybeRefOrGetter<CommonCoord | undefined>, options?: UseElementOverlayOptions): UseElementOverlayRetrun;
|
|
763
|
-
//# sourceMappingURL=index.d.ts.map
|
|
764
369
|
//#endregion
|
|
765
370
|
//#region useEntity/index.d.ts
|
|
766
371
|
interface UseEntityOptions {
|
|
@@ -790,8 +395,7 @@ declare function useEntity<T extends Entity = Entity>(entity?: MaybeRefOrAsyncGe
|
|
|
790
395
|
*
|
|
791
396
|
* overLoaded2: Parameter supports passing in an array.
|
|
792
397
|
*/
|
|
793
|
-
declare function useEntity<T extends Entity = Entity>(entities?: MaybeRefOrAsyncGetter<Array<T | undefined
|
|
794
|
-
//# sourceMappingURL=index.d.ts.map
|
|
398
|
+
declare function useEntity<T extends Entity = Entity>(entities?: MaybeRefOrAsyncGetter<Array<T | undefined> | undefined>, options?: UseEntityOptions): ComputedRef<T[] | undefined>;
|
|
795
399
|
//#endregion
|
|
796
400
|
//#region useEntityScope/index.d.ts
|
|
797
401
|
interface UseEntityScopeOptions {
|
|
@@ -799,37 +403,13 @@ interface UseEntityScopeOptions {
|
|
|
799
403
|
* The collection of Entity to be added
|
|
800
404
|
* @default useViewer().value.entities
|
|
801
405
|
*/
|
|
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;
|
|
406
|
+
collection?: MaybeRefOrGetter<EntityCollection | undefined>;
|
|
826
407
|
}
|
|
827
408
|
/**
|
|
828
409
|
* Make `add` and `remove` operations of `EntityCollection` scoped,
|
|
829
410
|
* automatically remove `Entity` instance when component is unmounted.
|
|
830
411
|
*/
|
|
831
|
-
declare function useEntityScope(options?: UseEntityScopeOptions):
|
|
832
|
-
//# sourceMappingURL=index.d.ts.map
|
|
412
|
+
declare function useEntityScope(options?: UseEntityScopeOptions): UseCollectionScopeReturn<Entity, any[], any[], any>;
|
|
833
413
|
//#endregion
|
|
834
414
|
//#region useGraphicEvent/useDrag.d.ts
|
|
835
415
|
/**
|
|
@@ -853,9 +433,6 @@ interface GraphicDragEvent {
|
|
|
853
433
|
*/
|
|
854
434
|
lockCamera: () => void;
|
|
855
435
|
}
|
|
856
|
-
/**
|
|
857
|
-
* Use graphic drag events with ease, and remove listener automatically on unmounted.
|
|
858
|
-
*/
|
|
859
436
|
//#endregion
|
|
860
437
|
//#region useGraphicEvent/useHover.d.ts
|
|
861
438
|
/**
|
|
@@ -875,9 +452,6 @@ interface GraphicHoverEvent {
|
|
|
875
452
|
*/
|
|
876
453
|
hovering: boolean;
|
|
877
454
|
}
|
|
878
|
-
/**
|
|
879
|
-
* Use graphic hover events with ease, and remove listener automatically on unmounted.
|
|
880
|
-
*/
|
|
881
455
|
//#endregion
|
|
882
456
|
//#region useGraphicEvent/usePositioned.d.ts
|
|
883
457
|
type PositionedEventType = 'LEFT_DOWN' | 'LEFT_UP' | 'LEFT_CLICK' | 'LEFT_DOUBLE_CLICK' | 'RIGHT_DOWN' | 'RIGHT_UP' | 'RIGHT_CLICK' | 'MIDDLE_DOWN' | 'MIDDLE_UP' | 'MIDDLE_CLICK';
|
|
@@ -899,7 +473,7 @@ interface GraphicPositionedEvent {
|
|
|
899
473
|
type CesiumGraphic = Entity | any;
|
|
900
474
|
type GraphicEventType = PositionedEventType | 'HOVER' | 'DRAG';
|
|
901
475
|
type GraphicEventListener<T extends GraphicEventType> = T extends 'DRAG' ? (event: GraphicDragEvent) => void : T extends 'HOVER' ? (event: GraphicHoverEvent) => void : (event: GraphicPositionedEvent) => void;
|
|
902
|
-
type
|
|
476
|
+
type removeFn = () => void;
|
|
903
477
|
interface AddGraphicEventOptions {
|
|
904
478
|
/**
|
|
905
479
|
* The cursor style to use when the mouse is over the graphic.
|
|
@@ -919,27 +493,26 @@ interface UseGraphicEventRetrun {
|
|
|
919
493
|
* @param type - The event type, 'all' indicates clearing all events.
|
|
920
494
|
* @param listener - The event listener function.
|
|
921
495
|
*/
|
|
922
|
-
|
|
496
|
+
add: <T extends GraphicEventType>(graphic: CesiumGraphic | 'global', type: T, listener: GraphicEventListener<T>, options?: AddGraphicEventOptions) => removeFn;
|
|
923
497
|
/**
|
|
924
498
|
* Remove a graphic event listener.
|
|
925
499
|
* @param graphic - The graphic object, 'global' indicates the global graphic object.
|
|
926
500
|
* @param type - The event type, 'all' indicates clearing all events.
|
|
927
501
|
* @param listener - The event listener function.
|
|
928
502
|
*/
|
|
929
|
-
|
|
503
|
+
remove: <T extends GraphicEventType>(graphic: CesiumGraphic | 'global', type: T, listener: GraphicEventListener<T>) => void;
|
|
930
504
|
/**
|
|
931
505
|
* Clear graphic event listeners.
|
|
932
506
|
* @param graphic - The graphic object.
|
|
933
507
|
* @param type - The event type, 'all' indicates clearing all events.
|
|
934
508
|
*/
|
|
935
|
-
|
|
509
|
+
clear: (graphic: CesiumGraphic | 'global', type: GraphicEventType | 'all') => void;
|
|
936
510
|
}
|
|
937
511
|
/**
|
|
938
512
|
* Handle graphic event listeners and cursor styles for Cesium graphics.
|
|
939
513
|
* You don't need to overly worry about memory leaks from the function, as it automatically cleans up internally.
|
|
940
514
|
*/
|
|
941
515
|
declare function useGraphicEvent(): UseGraphicEventRetrun;
|
|
942
|
-
//# sourceMappingURL=index.d.ts.map
|
|
943
516
|
//#endregion
|
|
944
517
|
//#region useImageryLayer/index.d.ts
|
|
945
518
|
interface UseImageryLayerOptions {
|
|
@@ -975,8 +548,7 @@ declare function useImageryLayer<T extends ImageryLayer = ImageryLayer>(layer?:
|
|
|
975
548
|
*
|
|
976
549
|
* overLoaded2: Parameter supports passing in an array.
|
|
977
550
|
*/
|
|
978
|
-
declare function useImageryLayer<T extends ImageryLayer = ImageryLayer>(layers?: MaybeRefOrAsyncGetter<Array<T | undefined
|
|
979
|
-
//# sourceMappingURL=index.d.ts.map
|
|
551
|
+
declare function useImageryLayer<T extends ImageryLayer = ImageryLayer>(layers?: MaybeRefOrAsyncGetter<Array<T | undefined> | undefined>, options?: UseImageryLayerOptions): ComputedRef<T[] | undefined>;
|
|
980
552
|
//#endregion
|
|
981
553
|
//#region useImageryLayerScope/index.d.ts
|
|
982
554
|
interface UseImageryLayerScopeOptions {
|
|
@@ -984,7 +556,7 @@ interface UseImageryLayerScopeOptions {
|
|
|
984
556
|
* The collection of ImageryLayer to be added
|
|
985
557
|
* @default useViewer().value.imageryLayers
|
|
986
558
|
*/
|
|
987
|
-
collection?: MaybeRefOrGetter<ImageryLayerCollection>;
|
|
559
|
+
collection?: MaybeRefOrGetter<ImageryLayerCollection | undefined>;
|
|
988
560
|
/**
|
|
989
561
|
* The second parameter passed to the `remove` function
|
|
990
562
|
*
|
|
@@ -992,35 +564,11 @@ interface UseImageryLayerScopeOptions {
|
|
|
992
564
|
*/
|
|
993
565
|
destroyOnRemove?: boolean;
|
|
994
566
|
}
|
|
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
567
|
/**
|
|
1019
568
|
* Make `add` and `remove` operations of `ImageryLayerCollection` scoped,
|
|
1020
569
|
* automatically remove `ImageryLayer` instance when component is unmounted.
|
|
1021
570
|
*/
|
|
1022
|
-
declare function useImageryLayerScope(options?: UseImageryLayerScopeOptions):
|
|
1023
|
-
//# sourceMappingURL=index.d.ts.map
|
|
571
|
+
declare function useImageryLayerScope(options?: UseImageryLayerScopeOptions): UseCollectionScopeReturn<ImageryLayer, any[], any[], any>;
|
|
1024
572
|
//#endregion
|
|
1025
573
|
//#region usePostProcessStage/index.d.ts
|
|
1026
574
|
interface UsePostProcessStageOptions {
|
|
@@ -1050,8 +598,7 @@ declare function usePostProcessStage<T extends PostProcessStage = PostProcessSta
|
|
|
1050
598
|
*
|
|
1051
599
|
* overLoaded2: Parameter supports passing in an array.
|
|
1052
600
|
*/
|
|
1053
|
-
declare function usePostProcessStage<T extends PostProcessStage = PostProcessStage>(stages?: MaybeRefOrAsyncGetter<Array<T | undefined
|
|
1054
|
-
//# sourceMappingURL=index.d.ts.map
|
|
601
|
+
declare function usePostProcessStage<T extends PostProcessStage = PostProcessStage>(stages?: MaybeRefOrAsyncGetter<Array<T | undefined> | undefined>, options?: UsePostProcessStageOptions): ComputedRef<T[] | undefined>;
|
|
1055
602
|
//#endregion
|
|
1056
603
|
//#region usePostProcessStageScope/index.d.ts
|
|
1057
604
|
interface UsePostProcessStageScopeOptions {
|
|
@@ -1059,37 +606,13 @@ interface UsePostProcessStageScopeOptions {
|
|
|
1059
606
|
* The collection of PostProcessStage to be added
|
|
1060
607
|
* @default useViewer().value.postProcessStages
|
|
1061
608
|
*/
|
|
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;
|
|
609
|
+
collection?: MaybeRefOrGetter<PostProcessStageCollection | undefined>;
|
|
1086
610
|
}
|
|
1087
611
|
/**
|
|
1088
612
|
* Make `add` and `remove` operations of `PostProcessStageCollection` scoped,
|
|
1089
613
|
* automatically remove `PostProcessStage` instance when component is unmounted.
|
|
1090
614
|
*/
|
|
1091
|
-
declare function usePostProcessStageScope(options?: UsePostProcessStageScopeOptions):
|
|
1092
|
-
//# sourceMappingURL=index.d.ts.map
|
|
615
|
+
declare function usePostProcessStageScope(options?: UsePostProcessStageScopeOptions): UseCollectionScopeReturn<PostProcessStage | PostProcessStageComposite, any[], any[], any>;
|
|
1093
616
|
//#endregion
|
|
1094
617
|
//#region usePrimitive/index.d.ts
|
|
1095
618
|
interface UsePrimitiveOptions {
|
|
@@ -1120,46 +643,28 @@ declare function usePrimitive<T = any>(primitive?: MaybeRefOrAsyncGetter<T | und
|
|
|
1120
643
|
*
|
|
1121
644
|
* overLoaded2: Parameter supports passing in an array.
|
|
1122
645
|
*/
|
|
1123
|
-
declare function usePrimitive<T = any>(primitives?: MaybeRefOrAsyncGetter<Array<T | undefined
|
|
1124
|
-
//# sourceMappingURL=index.d.ts.map
|
|
646
|
+
declare function usePrimitive<T = any>(primitives?: MaybeRefOrAsyncGetter<Array<T | undefined> | undefined>, options?: UsePrimitiveOptions): ComputedRef<T[] | undefined>;
|
|
1125
647
|
//#endregion
|
|
1126
648
|
//#region usePrimitiveScope/index.d.ts
|
|
1127
649
|
interface UsePrimitiveScopeOptions {
|
|
1128
650
|
/**
|
|
1129
|
-
* The collection of Primitive to be added
|
|
651
|
+
* The collection of Primitive to be added,
|
|
652
|
+
* 'ground' alias `useViewer().value.scene.groundPrimitives`
|
|
1130
653
|
* @default useViewer().value.scene.primitives
|
|
1131
654
|
*/
|
|
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;
|
|
655
|
+
collection?: MaybeRefOrGetter<PrimitiveCollection | 'ground' | undefined>;
|
|
1156
656
|
}
|
|
1157
657
|
/**
|
|
1158
658
|
* Make `add` and `remove` operations of `PrimitiveCollection` scoped,
|
|
1159
659
|
* automatically remove `Primitive` instance when component is unmounted.
|
|
1160
660
|
*/
|
|
1161
|
-
declare function usePrimitiveScope(options?: UsePrimitiveScopeOptions):
|
|
1162
|
-
|
|
661
|
+
declare function usePrimitiveScope(options?: UsePrimitiveScopeOptions): {
|
|
662
|
+
scope: Readonly<vue0.ShallowReactive<Set<any>>>;
|
|
663
|
+
add: <R extends any>(instance: R, ...args: any[]) => R extends Promise<infer U> ? Promise<U> : any;
|
|
664
|
+
remove: (instance: any, ...args: any[]) => any;
|
|
665
|
+
removeWhere: (predicate: EffcetRemovePredicate<any>, ...args: any[]) => void;
|
|
666
|
+
removeScope: (...args: any[]) => void;
|
|
667
|
+
};
|
|
1163
668
|
//#endregion
|
|
1164
669
|
//#region useScaleBar/index.d.ts
|
|
1165
670
|
interface UseScaleBarOptions {
|
|
@@ -1197,7 +702,6 @@ interface UseScaleBarRetrun {
|
|
|
1197
702
|
* Reactive generation of scale bars
|
|
1198
703
|
*/
|
|
1199
704
|
declare function useScaleBar(options?: UseScaleBarOptions): UseScaleBarRetrun;
|
|
1200
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1201
705
|
//#endregion
|
|
1202
706
|
//#region useSceneDrillPick/index.d.ts
|
|
1203
707
|
interface UseSceneDrillPickOptions {
|
|
@@ -1233,7 +737,6 @@ interface UseSceneDrillPickOptions {
|
|
|
1233
737
|
* @param windowPosition The screen coordinates of the pick point.
|
|
1234
738
|
*/
|
|
1235
739
|
declare function useSceneDrillPick(windowPosition: MaybeRefOrGetter<Cartesian2 | undefined>, options?: UseSceneDrillPickOptions): ComputedRef<any[] | undefined>;
|
|
1236
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1237
740
|
//#endregion
|
|
1238
741
|
//#region useScenePick/index.d.ts
|
|
1239
742
|
interface UseScenePickOptions {
|
|
@@ -1265,7 +768,6 @@ interface UseScenePickOptions {
|
|
|
1265
768
|
* @param windowPosition The screen coordinates of the pick point.
|
|
1266
769
|
*/
|
|
1267
770
|
declare function useScenePick(windowPosition: MaybeRefOrGetter<Cartesian2 | undefined>, options?: UseScenePickOptions): Readonly<ShallowRef<any | undefined>>;
|
|
1268
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1269
771
|
//#endregion
|
|
1270
772
|
//#region useScreenSpaceEventHandler/index.d.ts
|
|
1271
773
|
type ScreenSpaceEvent<T extends ScreenSpaceEventType> = {
|
|
@@ -1305,7 +807,6 @@ interface UseScreenSpaceEventHandlerOptions {
|
|
|
1305
807
|
* @param inputAction Callback function for listening
|
|
1306
808
|
*/
|
|
1307
809
|
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
810
|
//#endregion
|
|
1310
811
|
//#region useViewer/index.d.ts
|
|
1311
812
|
/**
|
|
@@ -1316,8 +817,6 @@ declare function useScreenSpaceEventHandler<T extends ScreenSpaceEventType>(type
|
|
|
1316
817
|
* - When calling `createViewer` and `useViewer` in the same component, `createViewer` should be called before `useViewer`.
|
|
1317
818
|
*/
|
|
1318
819
|
declare function useViewer(): Readonly<ShallowRef<Viewer | undefined>>;
|
|
1319
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1320
|
-
|
|
1321
820
|
//#endregion
|
|
1322
|
-
export { AddGraphicEventOptions,
|
|
821
|
+
export { AddGraphicEventOptions, CesiumGraphic, EffcetRemovePredicate, GraphicEventListener, GraphicEventType, MaybeAsyncGetter, MaybeRefOrAsyncGetter, OnAsyncGetterCancel, ScreenSpaceEvent, ToPromiseValueOptions, UseCameraStateOptions, UseCameraStateRetrun, UseCesiumEventListenerOptions, UseCesiumFpsOptions, UseCesiumFpsRetrun, UseCollectionScopeOptions, UseCollectionScopeReturn, UseDataSourceOptions, UseDataSourceScopeOptions, UseElementOverlayOptions, UseElementOverlayRetrun, UseEntityOptions, UseEntityScopeOptions, UseGraphicEventRetrun, UseImageryLayerOptions, UseImageryLayerScopeOptions, UsePostProcessStageOptions, UsePostProcessStageScopeOptions, UsePrimitiveOptions, UsePrimitiveScopeOptions, UseScaleBarOptions, UseScaleBarRetrun, UseSceneDrillPickOptions, UseScenePickOptions, UseScreenSpaceEventHandlerOptions, createViewer, removeFn, toPromiseValue, useCameraState, useCesiumEventListener, useCesiumFps, useCollectionScope, useDataSource, useDataSourceScope, useElementOverlay, useEntity, useEntityScope, useGraphicEvent, useImageryLayer, useImageryLayerScope, usePostProcessStage, usePostProcessStageScope, usePrimitive, usePrimitiveScope, useScaleBar, useSceneDrillPick, useScenePick, useScreenSpaceEventHandler, useViewer };
|
|
1323
822
|
//# sourceMappingURL=index.d.mts.map
|