Animates a View's Camera to smoothly transition to a specified target, such as a component, bounding box, or viewpoint.

Use @xeokit/sdk/cameraflight to create cinematic camera motions.

Hierarchy (View Summary)

Constructors

Properties

camera: Camera

The Camera controlled by this CameraFlightAnimation.

destroyed: boolean

True once this Component has been destroyed.

Don't use this Component if this is true.

dirty: boolean
easing: boolean
id: string

Unique ID of this Component.

Fires when the camera animation is cancelled.

Fires when the camera animation starts.

Fires when the camera animation completes.

view: View

The View that owns this CameraFlightAnimation.

Accessors

Methods

  • Protected

    Logs an error for this component to the JavaScript console.

    The console message will have this format: [ERROR] [<component type> =<component id>: <message>

    Parameters

    • message: string

      The error message to log

    Returns void

  • Animates the camera to a target viewpoint or bounding volume.

    • If a bounding box is provided, the camera will fly to frame the box within the view.
    • If eye, look, and up are provided, the camera will interpolate to that exact pose.

    Parameters

    • params: FlyToParams = {}

      Parameters defining the flight target and behavior.

    • Optionalcallback: (arg0: any) => void

      Optional callback invoked after the flight completes.

    Returns void

  • Instantly moves the camera to a specified viewpoint or bounding volume, without animation.

    • If a bounding box is provided, the camera will immediately frame it in the view.
    • If eye, look, and up are provided, the camera will immediately assume that pose.

    Parameters

    • params: any

      Target camera state or bounding box.

    Returns void

  • Protected

    Logs a message for this component.

    The message will have this format: [LOG] [<component type> <component id>: <message>

    Parameters

    • message: string

      The message to log

    Returns void

  • Protected

    Logs a warning for this component to the JavaScript console.

    The console message will have this format: [WARN] [<component type> =<component id>: <message>

    Parameters

    • message: string

      The warning message to log

    Returns void

Events

onDestroyed: EventEmitter<Component, null>

Emits an event when the Component has been destroyed.