interpolate constant
Produces continuous, smooth results by interpolating between pairs of
input and output values ("stops"). The input
may be any numeric
expression (e.g., ["get", "population"]
). Stop inputs must be
numeric literals in strictly ascending order. The output type must be
number
, array<number>
, or color
.Interpolation types:-
["linear"]
: interpolates linearly between the pair of stops just
less than and just greater than the input.- ["exponential", base]
:
interpolates exponentially between the stops just less than and just
greater than the input. base
controls the rate at which the output
increases: higher values make the output increase more towards the
high end of the range. With values close to 1 the output increases
linearly.- ["cubic-bezier", x1, y1, x2, y2]
: interpolates using the
cubic bezier curve defined by the given control points.
Sdk Support: basic functionality with js, android, ios, macos
Implementation
static const interpolate = "interpolate";