Skip to main content

flywave-mapview.mapviewutils.rotate

Home > @flywave/flywave-mapview > MapViewUtils > rotate

MapViewUtils.rotate() function

Rotates the camera by the given delta yaw and delta pitch. The pitch will be clamped to the maximum possible tilt to the new target, and under the horizon in sphere projection.

Signature:

function rotate(mapView: {
projection: Projection;
camera: THREE.PerspectiveCamera;
}, deltaYawDeg: number, deltaPitchDeg?: number, maxTiltAngleRad?: number): void;

Parameters

Parameter

Type

Description

mapView

{ projection: Projection; camera: THREE.PerspectiveCamera; }

The MapView instance in use.

deltaYawDeg

number

Delta yaw in degrees.

deltaPitchDeg

number

(Optional) Delta pitch in degrees.

maxTiltAngleRad

number

(Optional) Max tilt angle in radians.

Returns:



void