Skip to main content

Class: NeedleAnimator

An animator for HSI needle rotations.

Constructors

constructor

new NeedleAnimator(turnRate): NeedleAnimator

Constructor.

Parameters

NameTypeDescription
turnRatenumberThe turn rate, in degrees per second, used by this animator.

Returns

NeedleAnimator

Defined in

src/garminsdk/components/nextgenpfd/hsi/NeedleAnimator.ts:22

Properties

rotation

Readonly rotation: Subscribable<number>

This animator's current rotation, in degrees.

Defined in

src/garminsdk/components/nextgenpfd/hsi/NeedleAnimator.ts:16

Methods

animateRotation

animateRotation(target): void

Animates a rotation. This animator's rotation will be animated to rotate toward a target rotation with easing at the start and end. If another animation is currently active, it will be immediately stopped and replaced by the new animation, and the ease in will be skipped.

Parameters

NameTypeDescription
targetnumberThe target rotation, in degrees.

Returns

void

Defined in

src/garminsdk/components/nextgenpfd/hsi/NeedleAnimator.ts:31


setRotation

setRotation(rotation): void

Immediately sets this animator's rotation to a given value and cancels any animation in progress.

Parameters

NameTypeDescription
rotationnumberThe rotation to set, in degrees.

Returns

void

Defined in

src/garminsdk/components/nextgenpfd/hsi/NeedleAnimator.ts:55


stopAnimation

stopAnimation(setAnimationTarget?): void

Stops the current animation in progress, if any, and optionally sets this animator's rotation to the animation target.

Parameters

NameTypeDefault valueDescription
setAnimationTargetbooleanfalseWhether to set this animator's rotation to the animation target. Defaults to false.

Returns

void

Defined in

src/garminsdk/components/nextgenpfd/hsi/NeedleAnimator.ts:64