Class: MapCompassAnimator
Defined in: workingtitle-instruments-epic2/shared/Map/MapCompassAnimator.ts:4
An animator driven by requestAnimationFrame designed for ND elements.
Constructors
Constructor
new MapCompassAnimator(
speed,isRunning,inputValue):MapCompassAnimator
Defined in: workingtitle-instruments-epic2/shared/Map/MapCompassAnimator.ts:20
Creates a new NdAnimator.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
speed | number | 5 | Higher is faster, but it gets faster fast, try incerements of 0.5. |
isRunning | undefined | Subscribable<boolean> | undefined | A subscribable boolean to control whether the animator is running. |
inputValue | undefined | Subscribable<number> | undefined | A subscribable number to control the target value with. |
Returns
MapCompassAnimator
Properties
output
readonlyoutput:Subscribable<number>
Defined in: workingtitle-instruments-epic2/shared/Map/MapCompassAnimator.ts:7
speed
readonlyspeed:number=5
Defined in: workingtitle-instruments-epic2/shared/Map/MapCompassAnimator.ts:21
Higher is faster, but it gets faster fast, try incerements of 0.5.
Methods
destroy()
destroy():
void
Defined in: workingtitle-instruments-epic2/shared/Map/MapCompassAnimator.ts:87
Cleans up the component.
Returns
void
setTargetValue()
readonlysetTargetValue(value?):void
Defined in: workingtitle-instruments-epic2/shared/Map/MapCompassAnimator.ts:34
Sets the value that the output will be gradually animated towards.
Parameters
| Parameter | Type | Description |
|---|---|---|
value? | null | number | The value to animate towards. If null or undefined, the target value will not change. |
Returns
void
start()
readonlystart():void
Defined in: workingtitle-instruments-epic2/shared/Map/MapCompassAnimator.ts:42
Starts the requestAnimationFrame loop.
Returns
void
stop()
readonlystop():void
Defined in: workingtitle-instruments-epic2/shared/Map/MapCompassAnimator.ts:51
Stops the requestAnimationFrame loop.
Returns
void
toggle()
readonlytoggle(force):void
Defined in: workingtitle-instruments-epic2/shared/Map/MapCompassAnimator.ts:62
Starts or stops the animaton based on a boolean.
Parameters
| Parameter | Type | Description |
|---|---|---|
force | boolean | If true, will start animation if not already running, else will stop animation. |
Returns
void