Class: Gradient
components.Gradient
Represents a gradient that can be used to interpolate between multiple color.
#
HierarchySpline
<Color
>↳
Gradient
#
Constructors#
constructor• new Gradient(...keys
)
Creates a new spline instance, using the specified keys. Note that you have to pass at least one key.
#
ParametersName | Type |
---|---|
...keys | SplineKey <Color >[] |
#
Inherited fromSpline<Color>.constructor
#
Defined in#
Methods#
evaluateâ–¸ evaluate(time
): Color
Evaluates the spline at the given time.
#
ParametersName | Type |
---|---|
time | number |
#
Returns#
Inherited fromSpline.evaluate
#
Defined in#
simpleâ–¸ Static
simple(...colors
): Gradient
Returns a gradient with evenly spaced keys from the given colors.
#
ParametersName | Type |
---|---|
...colors | Color [] |
#
Returns#
Defined in#
solidâ–¸ Static
solid(color
): Gradient
Returns a solid gradient from the given color.
#
ParametersName | Type |
---|---|
color | Color |