CameraFlightPath
Creates animations for camera flights.
Mouse interaction is disabled during flights.
Mouse interaction is disabled during flights.
Methods
-
staticCameraFlightPath.createAnimation(scene) → Object
-
Creates an animation to fly the camera from it's current position to a position given by a Cartesian. All arguments should be given in world coordinates.
Name Type Default Description sceneScene The scene instance to use. options.destinationCartesian3 The final position of the camera. options.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. options.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. options.durationNumber 3000optional The duration of the animation in milliseconds. options.onCompletefunction optional The function to execute when the animation has completed. options.onCancelfunction optional The function to execute if the animation is cancelled. options.endReferenceFrameMatrix4 optional The reference frame the camera will be in when the flight is completed. options.convertBoolean trueoptional When true, the destination is converted to the correct coordinate system for each scene mode. Whenfalse, the destination is expected to be in the correct coordinate system.Returns:
An Object that can be added to anAnimationCollectionfor animation.Throws:
-
DeveloperError : If either direction or up is given, then both are required.
See:
-
-
staticCameraFlightPath.createAnimationRectangle(scene, onComplete, onCancel, endReferenceFrame) → Object
-
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.
Name Type Default Description sceneScene The scene instance to use. options.destinationRectangle The final position of the camera. options.durationNumber 3000optional 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. Returns:
An Object that can be added to anAnimationCollectionfor animation.See:
