RedInterpolator:
Filter:
redSys/Classes (extension) | Red > redScore

RedInterpolator
ExtensionExtension

holds a value and interpolates to new target

Description

Interpolator.

Class Methods

.new

Arguments:

value

Start value.

tick

Update rate / resolution.

clock

If no clock passed in the SystemClock will be used.

Instance Methods

.action

An optional Function that will be evaluated for each step. The arguments passed in are: current value, current ramp position (0.0-1.0), current step index, total number of steps.

.clock

Get or ser the clock.

.goto

Run the interpolator.

Arguments:

target

The target value to go to.

dur

Duration in seconds.

curve

Curvature. If nil then linear. Can also be a SimpleNumber, a custom Function or an Ease object (install the Ease quark with Quarks.install("Ease");).

.tick

Get or set the update rate.

.value

Get or set the current value (jump).

Examples