Class: Dynamic

PSV.Dynamic

new PSV.Dynamic (fn, min, max) package

Represents a variable that can dynamically change with time (using requestAnimationFrame)

Name Type Description
fn function

Callback function

min number optional

Minimum position

max number optional

Maximum position

Members

current number readonly

Methods

goto (position, speedMult)

Defines the target position

Name Type Default Description
position number
speedMult number 1 optional

roll (invert, speedMult)

Starts infinite movement

Name Type Default Description
invert boolean false optional
speedMult number 1 optional

setSpeed (speed)

Changes base speed

Name Type Description
speed number

setValue (values)

Defines the current position and immediately stops movement

Name Type Description
values number

step (step, speedMult)

Increase/decrease the target position

Name Type Default Description
step number
speedMult number 1 optional

stop ()

Stops movement

update () package