Interpolates between A->B over duration. Given the same A & B values, steps will be larger if it's a longer duration, and shorter if it's a smaller duration.
duration
ixfx Guide on Interpolation
A function is returned, which when invoked yields a value between A..B.
Alternatively to step through by the same amount regardless of time, use interpolatorStepped.
// Interpolate from 0..1 over one minuteconst v = interpolatorNumberInterval({mins:1});v(); // Compute current value Copy
// Interpolate from 0..1 over one minuteconst v = interpolatorNumberInterval({mins:1});v(); // Compute current value
Use start and end points:
// Interpolate from 100-200 over 10 secondsconst v = interpolatorNumberInterval({secs:10}, 100, 200);v(); // Compute current value Copy
// Interpolate from 100-200 over 10 secondsconst v = interpolatorNumberInterval({secs:10}, 100, 200);v(); // Compute current value
Duration for interpolation
Start point
End point
Optional
Options for interpolation
Interpolator function.
Interpolates between A->B over
duration. Given the same A & B values, steps will be larger if it's a longer duration, and shorter if it's a smaller duration.ixfx Guide on Interpolation
A function is returned, which when invoked yields a value between A..B.
Alternatively to step through by the same amount regardless of time, use interpolatorStepped.
Use start and end points: