Library globals

Function globals . globals . interpolate

View source

Convenience wrapper for the _interpolate function.  Takes a
single string or props.Node object in arg[0] indicating a target
property, and a variable-length list of time/value pairs.  Example:

interpolate("/animations/radar/angle",
180, 1, 360, 1, 0, 0,
180, 1, 360, 1, 0, 0,
180, 1, 360, 1, 0, 0,
180, 1, 360, 1, 0, 0,
180, 1, 360, 1, 0, 0,
180, 1, 360, 1, 0, 0,
180, 1, 360, 1, 0, 0,
180, 1, 360, 1, 0, 0);

This will swing the "radar dish" smoothly through 8 revolutions over
16 seconds.  Note the use of zero-time interpolation between 360 and
0 to wrap the interpolated value properly.

Parameters

node

val
variable