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
| Parameter | Type | Description |
|---|---|---|
turnRate | number | The turn rate, in degrees per second, used by this animator. |
Returns
NeedleAnimator
Properties
rotation
readonlyrotation: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
| Parameter | Type | Description |
|---|---|---|
target | number | The 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
| Parameter | Type | Description |
|---|---|---|
rotation | number | The 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
| Parameter | Type | Default value | Description |
|---|---|---|---|
setAnimationTarget | boolean | false | Whether to set this animator's rotation to the animation target. Defaults to false. |
Returns
void