Class: Animator
An animator.
Constructors
constructor
• new Animator(): Animator
Returns
Accessors
value
• get
value(): Subscribable
<number
>
This animator's current value.
Returns
Subscribable
<number
>
Defined in
src/sdk/utils/controllers/Animator.ts:19
Methods
isAnimating
▸ isAnimating(): boolean
Checks whether this animator has an animation in progress.
Returns
boolean
Whether this animator has an animation in progress.
Defined in
src/sdk/utils/controllers/Animator.ts:36
set
▸ set(value
): void
Immediately sets this animator's value. This will stop any animation currently in progress.
Parameters
Name | Type | Description |
---|---|---|
value | number | The rotation to set, in degrees. |
Returns
void
Defined in
src/sdk/utils/controllers/Animator.ts:90
start
▸ start(target
, duration
, easeFunc?
): void
Starts an animation. The animation will proceed from this animator's current value to the target value over the specified duration. If another animation is currently active, it will immediately be stopped and replaced by the new animation.
Parameters
Name | Type | Description |
---|---|---|
target | number | The target value. |
duration | number | The duration of the animation, in milliseconds. |
easeFunc? | AnimatorEasingFunc | The easing function to apply to the animation. Defaults to a linear easing function. |
Returns
void
Defined in
src/sdk/utils/controllers/Animator.ts:48
stop
▸ stop(setAnimationTarget?
): void
Stops this animator's current in-progress animation, if any, and optionally sets this animator's value to the animation's target value.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
setAnimationTarget | boolean | false | Whether to set this animator's value to the animation target value after stopping the animation. Defaults to false . |
Returns
void
Defined in
src/sdk/utils/controllers/Animator.ts:101