import { Arrayable, FunctionArgs, MaybeComputedElementRef } from "@vueuse/core"; import { Camera, Cartesian2, Cartesian3, Cartographic, DataSourceCollection, Entity, EntityCollection, Event, GroundPrimitive, ImageryLayer, ImageryLayerCollection, KeyboardEventModifier, PostProcessStage, PostProcessStageCollection, PostProcessStageComposite, Primitive, PrimitiveCollection, Rectangle, ScreenSpaceEventHandler, ScreenSpaceEventType, Viewer } from "cesium"; import * as _$vue from "vue"; import { ComputedRef, MaybeRef, MaybeRefOrGetter, Ref, ShallowReactive, ShallowRef, WatchStopHandle } from "vue"; import { CesiumDataSource, CommonCoord, Nullable, ScenePickResult } from "@vesium/shared"; export * from "@vesium/shared"; //#region createViewer/index.d.ts /** * Pass in an existing Viewer instance, * which can be accessed by the current component and its descendant components using {@link useViewer} * * When the Viewer instance referenced by this overloaded function becomes invalid, it will not trigger destruction. * @param viewer - Existing viewer instance * @returns The Viewer instance */ declare function createViewer(viewer: MaybeRef): Readonly>; /** * Initialize a Viewer instance, which can be accessed by the * current component and its descendant components using {@link useViewer}. * * The Viewer instance created by this overloaded function will automatically be destroyed when it becomes invalid. * * @param element - The DOM element or ID that will contain the widget * @param options - see `Viewer.ConstructorOptions` * @returns The Viewer instance */ declare function createViewer(element: MaybeComputedElementRef, options?: Viewer.ConstructorOptions): Readonly>; //#endregion //#region toPromiseValue/index.d.ts type OnAsyncGetterCancel = (onCancel: () => void) => void; type MaybeAsyncGetter = () => (Promise | T); type MaybeRefOrAsyncGetter = MaybeRef | MaybeAsyncGetter; interface ToPromiseValueOptions { /** * Determines whether the source should be unwrapped to its raw value. * @default true */ raw?: boolean; } /** * Similar to Vue's built-in `toValue`, but capable of handling asynchronous functions, thus returning a `await value`. * * Used in conjunction with VueUse's `computedAsync`. * * @param source The source value, which can be a reactive reference or an asynchronous getter. * @param options Conversion options * @returns The converted value. * * @example * ```ts * * const data = computedAsync(async ()=> { * return await toPromiseValue(promiseRef) * }) * * ``` */ declare function toPromiseValue(source: MaybeRefOrAsyncGetter, options?: ToPromiseValueOptions): Promise; //#endregion //#region useCameraState/index.d.ts interface UseCameraStateOptions { /** * The camera to use * @default useViewer().value.scene.camera */ camera?: MaybeRefOrGetter; /** * Camera event type to watch * @default `changed` */ event?: MaybeRefOrGetter<'changed' | 'moveStart' | 'moveEnd'>; /** * Throttled delay duration (ms) * @default 8 */ delay?: number; } interface UseCameraStateReturn { /** * The camera */ camera: ComputedRef; /** * The position of the camera */ position: ComputedRef; /** * The view direction of the camera */ direction: ComputedRef; /** * The up direction of the camera */ up: ComputedRef; /** * The right direction of the camera */ right: ComputedRef; /** * Gets the {@link Cartographic} position of the camera, with longitude and latitude * expressed in radians and height in meters. In 2D and Columbus View, it is possible * for the returned longitude and latitude to be outside the range of valid longitudes * and latitudes when the camera is outside the map. */ positionCartographic: ComputedRef; /** * Gets the position of the camera in world coordinates */ positionWC: ComputedRef; /** * Gets the view direction of the camera in world coordinates */ directionWC: ComputedRef; /** * Gets the up direction of the camera in world coordinates */ upWC: ComputedRef; /** * Gets the right direction of the camera in world coordinates */ rightWC: ComputedRef; /** * Computes the approximate visible rectangle on the ellipsoid */ viewRectangle: ComputedRef; /** * Gets the camera heading in radians */ heading: ComputedRef; /** * Gets the camera pitch in radians */ pitch: ComputedRef; /** * Gets the camera roll in radians */ roll: ComputedRef; /** * Gets the camera center hierarchy level */ level: ComputedRef; } /** * Reactive Cesium Camera state * @param options options * @returns Reactive camera states */ declare function useCameraState(options?: UseCameraStateOptions): UseCameraStateReturn; //#endregion //#region useCesiumEventListener/index.d.ts interface UseCesiumEventListenerOptions { /** * Whether to active the event listener. * @default true */ isActive?: MaybeRefOrGetter; } /** * Easily use the `addEventListener` in `Cesium.Event` instances, * when the dependent data changes or the component is unmounted, * the listener function will automatically reload or destroy. * * @param event The Cesium.Event instance * @param listener The listener function * @param options additional options * @returns A function that can be called to remove the event listener */ declare function useCesiumEventListener>(event: Arrayable | undefined> | Arrayable | undefined>> | MaybeRefOrGetter | undefined>>, listener: FN, options?: UseCesiumEventListenerOptions): WatchStopHandle; //#endregion //#region useCesiumFps/index.d.ts interface UseCesiumFpsOptions { /** * Throttled sampling (ms) * @default 100 */ delay?: number; } interface UseCesiumFpsReturn { /** * Inter-frame Interval (ms) */ interval: Readonly>; /** * Frames Per Second */ fps: Readonly>; } /** * Reactive get the frame rate of Cesium * @param options options * @returns Reactive fps states */ declare function useCesiumFps(options?: UseCesiumFpsOptions): UseCesiumFpsReturn; //#endregion //#region useCollectionScope/index.d.ts type EffcetRemovePredicate = (instance: T) => boolean; interface UseCollectionScopeOptions { /** * add SideEffect function. e.g. `entities.add` */ addEffect: (instance: T | Promise, ...args: AddArgs) => T | Promise; /** * Clean SideEffect function. eg.`entities.remove` */ removeEffect: (instance: T, ...args: RemoveArgs) => RemoveReturn; /** * The parameters to pass for `removeScope` triggered when the component is unmounted */ removeScopeArgs?: RemoveArgs; } interface UseCollectionScopeReturn { /** * A `Set` for storing SideEffect instance, * which is encapsulated using `ShallowReactive` to provide Vue's reactive functionality */ scope: Readonly>>; /** * Add SideEffect instance */ add: >(instance: R, ...args: AddArgs) => R extends Promise ? Promise : T; /** * Remove specified SideEffect instance */ remove: (instance: T, ...args: RemoveArgs) => RemoveReturn; /** * Remove all SideEffect instance that meets the specified criteria */ removeWhere: (predicate: EffcetRemovePredicate, ...args: RemoveArgs) => void; /** * Remove all SideEffect instance within current scope */ removeScope: (...args: RemoveArgs) => void; } /** * Scope the SideEffects of Cesium-related `Collection` and automatically remove them when unmounted. * - note: This is a basic function that is intended to be called by other lower-level function * @returns Contains side effect addition and removal functions */ declare function useCollectionScope(options: UseCollectionScopeOptions): UseCollectionScopeReturn; //#endregion //#region useDataSource/index.d.ts interface UseDataSourceOptions { /** * The collection of DataSource to be added * @default useViewer().value.dataSources */ collection?: DataSourceCollection; /** * default value of `isActive` * @default true */ isActive?: MaybeRefOrGetter; /** * Ref passed to receive the updated of async evaluation */ evaluating?: Ref; /** * The second parameter passed to the `remove` function * * `dataSources.remove(dataSource,destroyOnRemove)` */ destroyOnRemove?: MaybeRefOrGetter; } /** * Add `DataSource` to the `DataSourceCollection`, automatically update when the data changes, and destroy the side effects caused by the previous `DataSource`. * * Overload 1: Parameter supports passing in a single value. * * @param dataSource The `DataSource` to added * @param options additional options * * @returns computedRef of the `DataSource` * * @overload */ declare function useDataSource(dataSource?: MaybeRefOrAsyncGetter, options?: UseDataSourceOptions): ComputedRef; /** * Add `DataSource` to the `DataSourceCollection`, automatically update when the data changes, and destroy the side effects caused by the previous `DataSource`. * * Overload 2: Parameter supports passing in an array. * * @param dataSources The list of `DataSource` to added * @param options additional options * * @returns computedRef of the `DataSource` * * @overload */ declare function useDataSource(dataSources?: MaybeRefOrAsyncGetter, options?: UseDataSourceOptions): ComputedRef; //#endregion //#region useDataSourceScope/index.d.ts interface UseDataSourceScopeOptions { /** * The collection of DataSource to be added * @default useViewer().value.dataSources */ collection?: MaybeRefOrGetter; /** * The second parameter passed to the `remove` function * * `dataSources.remove(dataSource,destroyOnRemove)` */ destroyOnRemove?: boolean; } /** * Scope the SideEffects of `DataSourceCollection` operations and automatically remove them when unmounted */ declare function useDataSourceScope(options?: UseDataSourceScopeOptions): UseCollectionScopeReturn; //#endregion //#region useElementOverlay/index.d.ts interface UseElementOverlayOptions { /** * Horizontal origin of the target element * @default `center` */ horizontal?: MaybeRefOrGetter<'center' | 'left' | 'right' | undefined>; /** * Vertical origin of the target element * @default `bottom` */ vertical?: MaybeRefOrGetter<'center' | 'bottom' | 'top' | undefined>; /** * Pixel offset presented by the target element * @default {x:0,y:0} */ offset?: MaybeRefOrGetter<{ x?: number; y?: number; } | undefined>; /** * The reference element for calculating the position of the target element * - `true` refer to the browser viewport * - `false` refer to the Cesium canvas */ referenceWindow?: MaybeRefOrGetter; /** * Whether to apply style to the target element * @default true */ applyStyle?: MaybeRefOrGetter; /** * The position will be clamped to the ground * */ clampToGround?: MaybeRefOrGetter; } interface UseElementOverlayReturn { /** * Calculation result of the target element's horizontal direction */ x: ComputedRef; /** * Calculation result of the target element's vertical direction */ y: ComputedRef; /** * Calculation `css` of the target element */ style: ComputedRef; } /** * Cesium HTMLElement Overlay */ declare function useElementOverlay(target?: MaybeComputedElementRef, position?: MaybeRefOrGetter, options?: UseElementOverlayOptions): UseElementOverlayReturn; //#endregion //#region useEntity/index.d.ts interface UseEntityOptions { /** * The collection of Entity to be added * @default useViewer().value.entities */ collection?: EntityCollection; /** * default value of `isActive` * @default true */ isActive?: MaybeRefOrGetter; /** * Ref passed to receive the updated of async evaluation */ evaluating?: Ref; } /** * Add `Entity` to the `EntityCollection`, automatically update when the data changes, and destroy the side effects caused by the previous `Entity`. * * Overload 1: Parameter supports passing in a single value. */ declare function useEntity(entity?: MaybeRefOrAsyncGetter, options?: UseEntityOptions): ComputedRef; /** * Add `Entity` to the `EntityCollection`, automatically update when the data changes, and destroy the side effects caused by the previous `Entity`. * * Overload 2: Parameter supports passing in an array. */ declare function useEntity(entities?: MaybeRefOrAsyncGetter | undefined>, options?: UseEntityOptions): ComputedRef; //#endregion //#region useEntityScope/index.d.ts interface UseEntityScopeOptions { /** * The collection of Entity to be added * @default useViewer().value.entities */ collection?: MaybeRefOrGetter; } /** * Make `add` and `remove` operations of `EntityCollection` scoped, * automatically remove `Entity` instance when component is unmounted. */ declare function useEntityScope(options?: UseEntityScopeOptions): UseCollectionScopeReturn; //#endregion //#region useGraphicEvent/useDrag.d.ts /** * Parameters for graphic drag events */ interface GraphicDragEvent { /** * Event of the motion event */ event: ScreenSpaceEventHandler.MotionEvent; /** * The graphic object picked by `scene.pick` */ pick: ScenePickResult; /** * Whether the graphic is currently being dragged. */ dragging: boolean; /** * Whether to lock the camera, Will automatically resume when you end dragging. */ lockCamera: () => void; } //#endregion //#region useGraphicEvent/useHover.d.ts /** * Parameters for graphic hover events */ interface GraphicHoverEvent { /** * Event of the motion event */ event: ScreenSpaceEventHandler.MotionEvent; /** * The graphic object picked by `scene.pick` */ pick: ScenePickResult; /** * Whether the graphic is currently being hoverged. Returns `true` continuously while hoverging, and `false` once it ends. */ hovering: boolean; } //#endregion //#region useGraphicEvent/usePositioned.d.ts type PositionedEventType = 'LEFT_DOWN' | 'LEFT_UP' | 'LEFT_CLICK' | 'LEFT_DOUBLE_CLICK' | 'RIGHT_DOWN' | 'RIGHT_UP' | 'RIGHT_CLICK' | 'MIDDLE_DOWN' | 'MIDDLE_UP' | 'MIDDLE_CLICK'; /** * Parameters for graphics click related events */ interface GraphicPositionedEvent { /** * Event of the picked area */ event: ScreenSpaceEventHandler.PositionedEvent; /** * The graphic object picked by `scene.pick` */ pick: ScenePickResult; } //#endregion //#region useGraphicEvent/index.d.ts type CesiumGraphic = Entity | any; type GraphicEventType = PositionedEventType | 'HOVER' | 'DRAG'; type GraphicEventListener = T extends 'DRAG' ? (event: GraphicDragEvent) => void : T extends 'HOVER' ? (event: GraphicHoverEvent) => void : (event: GraphicPositionedEvent) => void; type removeFn = () => void; interface AddGraphicEventOptions { /** * The cursor style to use when the mouse is over the graphic. * @default 'pointer' */ cursor?: Nullable | ((event: GraphicHoverEvent) => Nullable); /** * The cursor style to use when the mouse is over the graphic during a drag operation. * @default 'crosshair' */ dragCursor?: Nullable | ((event: GraphicHoverEvent) => Nullable); } interface UseGraphicEventReturn { /** * Add a graphic event listener and return a function to remove it. * @param graphic - The graphic object, 'global' indicates the global graphic object. * @param type - The event type, 'all' indicates clearing all events. * @param listener - The event listener function. */ add: (graphic: CesiumGraphic | 'global', type: T, listener: GraphicEventListener, options?: AddGraphicEventOptions) => removeFn; /** * Remove a graphic event listener. * @param graphic - The graphic object, 'global' indicates the global graphic object. * @param type - The event type, 'all' indicates clearing all events. * @param listener - The event listener function. */ remove: (graphic: CesiumGraphic | 'global', type: T, listener: GraphicEventListener) => void; /** * Clear graphic event listeners. * @param graphic - The graphic object. * @param type - The event type, 'all' indicates clearing all events. */ clear: (graphic: CesiumGraphic | 'global', type: GraphicEventType | 'all') => void; } /** * Handle graphic event listeners and cursor styles for Cesium graphics. * You don't need to overly worry about memory leaks from the function, as it automatically cleans up internally. */ declare function useGraphicEvent(): UseGraphicEventReturn; //#endregion //#region useImageryLayer/index.d.ts interface UseImageryLayerOptions { /** * The collection of ImageryLayer to be added * @default useViewer().value.imageryLayers */ collection?: ImageryLayerCollection; /** * default value of `isActive` * @default true */ isActive?: MaybeRefOrGetter; /** * Ref passed to receive the updated of async evaluation */ evaluating?: Ref; /** * The second parameter passed to the `remove` function * * `imageryLayers.remove(layer,destroyOnRemove)` */ destroyOnRemove?: MaybeRefOrGetter; /** * The second parameter passed to the `add` function * * `imageryLayers.add(layer,index)` */ index?: MaybeRefOrGetter; } /** * Add `ImageryLayer` to the `ImageryLayerCollection`, automatically update when the data changes, and destroy the side effects caused by the previous `ImageryLayer`. * * Overload 1: Parameter supports passing in a single value. */ declare function useImageryLayer(layer?: MaybeRefOrAsyncGetter, options?: UseImageryLayerOptions): ComputedRef; /** * Add `ImageryLayer` to the `ImageryLayerCollection`, automatically update when the data changes, and destroy the side effects caused by the previous `ImageryLayer`. * * Overload 2: Parameter supports passing in an array. */ declare function useImageryLayer(layers?: MaybeRefOrAsyncGetter | undefined>, options?: UseImageryLayerOptions): ComputedRef; //#endregion //#region useImageryLayerScope/index.d.ts interface UseImageryLayerScopeOptions { /** * The collection of ImageryLayer to be added * @default useViewer().value.imageryLayers */ collection?: MaybeRefOrGetter; /** * The second parameter passed to the `remove` function * * `imageryLayers.remove(imageryLayer,destroyOnRemove)` */ destroyOnRemove?: boolean; } /** * Make `add` and `remove` operations of `ImageryLayerCollection` scoped, * automatically remove `ImageryLayer` instance when component is unmounted. */ declare function useImageryLayerScope(options?: UseImageryLayerScopeOptions): UseCollectionScopeReturn; //#endregion //#region usePostProcessStage/index.d.ts interface UsePostProcessStageOptions { /** * The collection of PostProcessStage to be added * @default useViewer().scene.postProcessStages */ collection?: PostProcessStageCollection; /** * Whether to destroy the stage when removed from the collection. * When true, the stage's GPU resources will be released. * @default true */ destroyOnRemove?: boolean; /** * default value of `isActive` * @default true */ isActive?: MaybeRefOrGetter; /** * Ref passed to receive the updated of async evaluation */ evaluating?: Ref; } /** * Add `PostProcessStage` to the `PostProcessStageCollection`, automatically update when the data changes, and destroy the side effects caused by the previous `PostProcessStage`. * * Overload 1: Parameter supports passing in a single value. */ declare function usePostProcessStage(stage?: MaybeRefOrAsyncGetter, options?: UsePostProcessStageOptions): ComputedRef; /** * Add `PostProcessStage` to the `PostProcessStageCollection`, automatically update when the data changes, and destroy the side effects caused by the previous `PostProcessStage`. * * Overload 2: Parameter supports passing in an array. */ declare function usePostProcessStage(stages?: MaybeRefOrAsyncGetter | undefined>, options?: UsePostProcessStageOptions): ComputedRef; //#endregion //#region usePostProcessStageScope/index.d.ts interface UsePostProcessStageScopeOptions { /** * The collection of PostProcessStage to be added * @default useViewer().value.postProcessStages */ collection?: MaybeRefOrGetter; /** * Whether to destroy the stage when removed from the collection. * When true, the stage's GPU resources will be released. * @default true */ destroyOnRemove?: boolean; } /** * Make `add` and `remove` operations of `PostProcessStageCollection` scoped, * automatically remove `PostProcessStage` instance when component is unmounted. */ declare function usePostProcessStageScope(options?: UsePostProcessStageScopeOptions): UseCollectionScopeReturn; //#endregion //#region usePrimitive/index.d.ts interface UsePrimitiveOptions { /** * The collection of Primitive to be added * - `ground` : `useViewer().scene.groundPrimitives` * @default useViewer().scene.primitives */ collection?: PrimitiveCollection | 'ground'; /** * Whether to destroy the primitive when removed from the collection. * When true, the primitive's GPU resources will be released. * @default true */ destroyOnRemove?: boolean; /** * default value of `isActive` * @default true */ isActive?: MaybeRefOrGetter; /** * Ref passed to receive the updated of async evaluation */ evaluating?: Ref; } /** * Add `Primitive` to the `PrimitiveCollection`, automatically update when the data changes, and destroy the side effects caused by the previous `Primitive`. * * Overload 1: Parameter supports passing in a single value. */ declare function usePrimitive(primitive?: MaybeRefOrAsyncGetter, options?: UsePrimitiveOptions): ComputedRef; /** * Add `Primitive` to the `PrimitiveCollection`, automatically update when the data changes, and destroy the side effects caused by the previous `Primitive`. * * Overload 2: Parameter supports passing in an array. */ declare function usePrimitive(primitives?: MaybeRefOrAsyncGetter | undefined>, options?: UsePrimitiveOptions): ComputedRef; //#endregion //#region usePrimitiveScope/index.d.ts interface UsePrimitiveScopeOptions { /** * The collection of Primitive to be added, * 'ground' alias `useViewer().value.scene.groundPrimitives` * @default useViewer().value.scene.primitives */ collection?: MaybeRefOrGetter; /** * Whether to destroy the primitive when removed from the collection. * When true, the primitive's GPU resources will be released. * @default true */ destroyOnRemove?: boolean; } /** * Make `add` and `remove` operations of `PrimitiveCollection` scoped, * automatically remove `Primitive` instance when component is unmounted. */ declare function usePrimitiveScope(options?: UsePrimitiveScopeOptions): { scope: Readonly<_$vue.ShallowReactive>>; add: >(instance: R, ...args: any[]) => R extends Promise ? Promise : Primitive | GroundPrimitive; remove: (instance: Primitive | GroundPrimitive) => any; removeWhere: (predicate: EffcetRemovePredicate) => void; removeScope: () => void; }; //#endregion //#region useScaleBar/index.d.ts interface UseScaleBarOptions { /** * The maximum width of the scale (px) * @default 80 */ maxPixel?: MaybeRefOrGetter; /** * Throttled delay duration (ms) * @default 8 */ delay?: number; } interface UseScaleBarReturn { /** * The actual distance of a single pixel in the current canvas */ pixelDistance: Readonly>; /** * The width of the scale.(px) */ width: Readonly>; /** * The actual distance corresponding to the width of the scale (m) */ distance: Readonly>; /** * Formatted content of distance. * eg. 100m,100km */ distanceText: Readonly>; } /** * Reactive generation of scale bars */ declare function useScaleBar(options?: UseScaleBarOptions): UseScaleBarReturn; //#endregion //#region useSceneDrillPick/index.d.ts interface UseSceneDrillPickOptions { /** * Whether to activate the pick function. * @default true */ isActive?: MaybeRefOrGetter; /** * Throttled sampling (ms) * @default 8 */ throttled?: number; /** * If supplied, stop drilling after collecting this many picks. */ limit?: MaybeRefOrGetter; /** * The width of the pick rectangle. * @default 3 */ width?: MaybeRefOrGetter; /** * The height of the pick rectangle. * @default 3 */ height?: MaybeRefOrGetter; } /** * Uses the `scene.drillPick` function to perform screen point picking, * return a computed property containing the pick result, or undefined if no object is picked. * * @param windowPosition The screen coordinates of the pick point. */ declare function useSceneDrillPick(windowPosition: MaybeRefOrGetter, options?: UseSceneDrillPickOptions): ComputedRef; //#endregion //#region useScenePick/index.d.ts interface UseScenePickOptions { /** * Whether to active the event listener. * @default true */ isActive?: MaybeRefOrGetter; /** * Throttled sampling (ms) * @default 8 */ throttled?: number; /** * The width of the pick rectangle. * @default 3 */ width?: MaybeRefOrGetter; /** * The height of the pick rectangle. * @default 3 */ height?: MaybeRefOrGetter; } /** * Uses the `scene.pick` function in Cesium's Scene object to perform screen point picking, * return a computed property containing the pick result, or undefined if no object is picked. * * @param windowPosition The screen coordinates of the pick point. */ declare function useScenePick(windowPosition: MaybeRefOrGetter, options?: UseScenePickOptions): Readonly>; //#endregion //#region useScreenSpaceEventHandler/index.d.ts type ScreenSpaceEvent = { [ScreenSpaceEventType.LEFT_DOWN]: ScreenSpaceEventHandler.PositionedEvent; [ScreenSpaceEventType.LEFT_UP]: ScreenSpaceEventHandler.PositionedEvent; [ScreenSpaceEventType.LEFT_CLICK]: ScreenSpaceEventHandler.PositionedEvent; [ScreenSpaceEventType.LEFT_DOUBLE_CLICK]: ScreenSpaceEventHandler.PositionedEvent; [ScreenSpaceEventType.RIGHT_DOWN]: ScreenSpaceEventHandler.PositionedEvent; [ScreenSpaceEventType.RIGHT_UP]: ScreenSpaceEventHandler.PositionedEvent; [ScreenSpaceEventType.RIGHT_CLICK]: ScreenSpaceEventHandler.PositionedEvent; [ScreenSpaceEventType.MIDDLE_DOWN]: ScreenSpaceEventHandler.PositionedEvent; [ScreenSpaceEventType.MIDDLE_UP]: ScreenSpaceEventHandler.PositionedEvent; [ScreenSpaceEventType.MIDDLE_CLICK]: ScreenSpaceEventHandler.PositionedEvent; [ScreenSpaceEventType.MOUSE_MOVE]: ScreenSpaceEventHandler.MotionEvent; [ScreenSpaceEventType.WHEEL]: number; [ScreenSpaceEventType.PINCH_START]: ScreenSpaceEventHandler.TwoPointEvent; [ScreenSpaceEventType.PINCH_END]: ScreenSpaceEventHandler.TwoPointEvent; [ScreenSpaceEventType.PINCH_MOVE]: ScreenSpaceEventHandler.TwoPointMotionEvent; }[T]; interface UseScreenSpaceEventHandlerOptions { /** * Modifier key forwarded to Cesium. */ modifier?: MaybeRefOrGetter; /** * Whether to activate the event listener without tearing down the composable. * @default true */ isActive?: MaybeRefOrGetter; } /** * Easily use the `ScreenSpaceEventHandler`, * when the dependent data changes or the component is unmounted, * the listener function will automatically reload or destroy. * * @param type Types of mouse event * @param inputAction Callback function for listening */ declare function useScreenSpaceEventHandler(type?: MaybeRefOrGetter, inputAction?: (event: ScreenSpaceEvent) => any, options?: UseScreenSpaceEventHandlerOptions): WatchStopHandle; //#endregion //#region useViewer/index.d.ts /** * Obtain the `Viewer` instance injected through `createViewer` in the current component or its ancestor components. * * note: * - If `createViewer` and `useViewer` are called in the same component, the `Viewer` instance injected by `createViewer` will be used preferentially. * - When calling `createViewer` and `useViewer` in the same component, `createViewer` should be called before `useViewer`. */ declare function useViewer(): Readonly>; //#endregion export { AddGraphicEventOptions, CesiumGraphic, EffcetRemovePredicate, GraphicEventListener, GraphicEventType, MaybeAsyncGetter, MaybeRefOrAsyncGetter, OnAsyncGetterCancel, ScreenSpaceEvent, ToPromiseValueOptions, UseCameraStateOptions, UseCameraStateReturn, UseCesiumEventListenerOptions, UseCesiumFpsOptions, UseCesiumFpsReturn, UseCollectionScopeOptions, UseCollectionScopeReturn, UseDataSourceOptions, UseDataSourceScopeOptions, UseElementOverlayOptions, UseElementOverlayReturn, UseEntityOptions, UseEntityScopeOptions, UseGraphicEventReturn, UseImageryLayerOptions, UseImageryLayerScopeOptions, UsePostProcessStageOptions, UsePostProcessStageScopeOptions, UsePrimitiveOptions, UsePrimitiveScopeOptions, UseScaleBarOptions, UseScaleBarReturn, 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 }; //# sourceMappingURL=index.d.mts.map