Constructors
constructor
- new Dynamic(
fn: (val: number) => void,
config: { defaultValue: number; max: number; min: number; wrap: boolean },
): Dynamic Parameters
- fn: (val: number) => void
- config: { defaultValue: number; max: number; min: number; wrap: boolean }
Accessors
current
- get current(): number
Returns number
- set current(current: number): void
Returns void
Methods
goto
- goto(position: number, speedMult?: number): void
Parameters
- position: number
- speedMult: number = 1
Returns void
roll
- roll(invert?: boolean, speedMult?: number): void
Parameters
- invert: boolean = false
- speedMult: number = 1
Returns void
setSpeed
- setSpeed(speed: number): void
Returns void
setValue
- setValue(value: number): boolean
Returns boolean
step
- step(step: number, speedMult?: number): void
Parameters
- step: number
- speedMult: number = 1
Returns void
Represents a variable that can dynamically change with time (using requestAnimationFrame)