UNPKG

@itwin/core-frontend

Version:
48 lines 2.42 kB
/** @packageDocumentation * @module Views */ import { Arc3d, Point3d, SmoothTransformBetweenFrusta } from "@itwin/core-geometry"; import { Cartographic, Frustum, Tweens } from "@itwin/core-common"; import { GlobalLocation } from "./ViewGlobalLocation"; import { ScreenViewport } from "./Viewport"; import { Animator } from "./ViewAnimation"; /** Animates the transition of a [[Viewport]] to view a location on the Earth. The animation traces a flight path from the viewport's current [Frustum]($common) to the destination. * The duration of the animation varies based on the distance traversed. * @see [[Viewport.animateFlyoverToGlobalLocation]]. * @public * @extensions */ export declare class GlobeAnimator implements Animator { protected _flightTweens: Tweens; protected _viewport: ScreenViewport; protected _startCartographic?: Cartographic; protected _ellipsoidArc?: Arc3d; protected _columbusLine: Point3d[]; protected _flightLength: number; protected _endLocation: GlobalLocation; protected _endHeight?: number; protected _midHeight?: number; protected _startHeight?: number; protected _fixTakeoffInterpolator?: SmoothTransformBetweenFrusta; protected _fixTakeoffFraction?: number; protected _fixLandingInterpolator?: SmoothTransformBetweenFrusta; protected _afterLanding: Frustum; protected _afterFocusDistance: number; protected readonly _fixLandingFraction: number; protected readonly _scratchFrustum: Frustum; protected _moveFlightToFraction(fraction: number): boolean; /** Apply a SmoothTransformBetweenFrusta interpolator to the view based on a fraction. */ protected _moveFixToFraction(fract: number, interpolator: SmoothTransformBetweenFrusta): boolean; /** Create an animator to transition to the specified destination. * @param viewport The viewport to animate. * @param destination The destination to travel to. * @returns An animator, or undefined if the viewport's iModel is not geolocated or its view is not 3d. */ static create(viewport: ScreenViewport, destination: GlobalLocation): Promise<GlobeAnimator | undefined>; protected constructor(viewport: ScreenViewport, destination: GlobalLocation, afterLanding: Frustum, afterFocus: number); /** @internal */ animate(): boolean; /** @internal */ interrupt(): void; } //# sourceMappingURL=GlobeAnimator.d.ts.map