Class: NeedleAnimator
An animator for HSI needle rotations.
Constructors
constructor
• new NeedleAnimator(turnRate
): NeedleAnimator
Constructor.
Parameters
Name | Type | Description |
---|---|---|
turnRate | number | The turn rate, in degrees per second, used by this animator. |
Returns
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
Name | Type | Description |
---|---|---|
target | number | The 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
Name | Type | Description |
---|---|---|
rotation | number | The 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
Name | Type | Default value | Description |
---|---|---|---|
setAnimationTarget | boolean | false | Whether 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