Skip to main content

Class: NeedleAnimator

Defined in: src/garminsdk/components/nextgenpfd/hsi/NeedleAnimator.ts:6

An animator for HSI needle rotations.

Constructors​

Constructor​

new NeedleAnimator(turnRate): NeedleAnimator

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

Constructor.

Parameters​

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

Returns​

NeedleAnimator

Properties​

rotation​

readonly rotation: Subscribable<number>

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

This animator's current rotation, in degrees.

Methods​

animateRotation()​

animateRotation(target): void

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

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​

ParameterTypeDescription
targetnumberThe target rotation, in degrees.

Returns​

void


setRotation()​

setRotation(rotation): void

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

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

Parameters​

ParameterTypeDescription
rotationnumberThe rotation to set, in degrees.

Returns​

void


stopAnimation()​

stopAnimation(setAnimationTarget): void

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

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

Parameters​

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

Returns​

void