API

Class GeospatialCameraPointersInput

Geospatial camera inputs can simulate dragging the globe around or tilting the camera around some point on the globe This class will update the GeospatialCameraMovement class's movementDeltaCurrentFrame, and the camera is responsible for using these updates to calculate viewMatrix appropriately

Uses the inputMap on the movement class to determine which button maps to which interaction. Default: Left mouse button = pan (drag globe), Middle/Right mouse button = rotate (tilt)

Hierarchy

  • OrbitCameraPointersInput
    • GeospatialCameraPointersInput
Index
buttons: number[] = ...

Defines the buttons associated with the input to handle camera move.

Defines the camera the input is attached to.

doubleTapAnimationDurationMs: number = 1000

Duration (in milliseconds) of the fly-to animation triggered by a double tap.

doubleTapEasingFunction: Nullable<EasingFunction> = null

Optional easing function applied to the double-tap fly-to animation. An EasingFunction instance can be created once and reused across double taps.

multiTouchPanAndZoom: boolean = true

Defines whether panning is enabled for both pan (2 fingers swipe) and zoom (pinch) through multitouch.

multiTouchPanning: boolean = true

Defines whether panning (2 fingers swipe) is enabled through multitouch.

pinchToPanMax: number = 20

Defines the distance used to consider the camera in pan mode vs pinch/zoom. Basically if your fingers moves away from more than this distance you will be considered in pinch mode.

pinchZoom: boolean = true

Defines whether zoom (2 fingers pinch) is enabled through multitouch

  • Handles a multi-touch (pinch / two-finger pan) gesture. Detects whether the gesture should be interpreted as a pinch zoom or a two-finger pan based on cumulative finger distance change, and forwards the gesture to the parent class once a mode is decided.

    Parameters

    • pointA: Nullable<PointerTouch>

      First active touch point, or null if it just ended.

    • pointB: Nullable<PointerTouch>

      Second active touch point, or null if it just ended.

    • previousPinchSquaredDistance: number

      Squared distance between the two touches on the previous frame.

    • pinchSquaredDistance: number

      Squared distance between the two touches on the current frame.

    • previousMultiTouchPanPosition: Nullable<PointerTouch>

      Centroid of the two touches on the previous frame, or null if unavailable.

    • multiTouchPanPosition: Nullable<PointerTouch>

      Centroid of the two touches on the current frame, or null if the gesture ended.

    Returns void