CameraFlightPath
Creates animations for camera flights.
Mouse interaction is disabled during flights.
Source:
Methods
-
<static> createAnimationCartographic
-
Creates an animation to fly the camera from it's current position to a position given by a Cartographic. All arguments should be given in world coordinates.
Parameters:
Name Type Argument Default Description sceneScene The scene instance to use. description.destinationCartographic The final position of the camera. description.directionCartesian3 <optional>
The final direction of the camera. By default, the direction will point towards the center of the frame in 3D and in the negative z direction in Columbus view or 2D. description.upCartesian3 <optional>
The final up direction. By default, the up direction will point towards local north in 3D and in the positive y direction in Columbus view or 2D. description.durationNumber <optional>
3000 The duration of the animation in milliseconds. onCompleteFunction <optional>
The function to execute when the animation has completed. onCancelFunction <optional>
The function to execute if the animation is cancelled. endReferenceFrameMatrix4 <optional>
The reference frame the camera will be in when the flight is completed. Throws:
DeveloperError : frameState.mode cannot be SceneMode.MORPHINGReturns:
Object An Object that can be added to an AnimationCollection for animation.See:
-
<static> createAnimationRectangle
-
Creates an animation to fly the camera from it's current position to a position in which the entire rectangle will be visible. All arguments should be given in world coordinates.
Parameters:
Name Type Argument Default Description sceneScene The scene instance to use. description.destinationRectangle The final position of the camera. description.durationNumber <optional>
3000 The duration of the animation in milliseconds. onCompleteFunction <optional>
The function to execute when the animation has completed. onCancelFunction <optional>
The function to execute if the animation is cancelled. endReferenceFrameMatrix4 <optional>
The reference frame the camera will be in when the flight is completed. Throws:
DeveloperError : frameState.mode cannot be SceneMode.MORPHINGReturns:
Object An Object that can be added to an AnimationCollection for animation.See:
