SpriteGradient

Gradient for sprites.

Constructor

new SpriteGradient(values)

Create a new SpriteGradient.
Parameters:
NameTypeDescription
valuesObject | ObjectInitial values of gradient

Methods

get(point) → {Sprite}

Get the color on the gradient at a specified point.
Parameters:
NameTypeDescription
pointnumberPoint along the gradient (0-1)
Returns:
Resulting color at the specified point along the gradient
Type: 
Sprite

set(point, color)

Set a Color at a point
Parameters:
NameTypeDescription
pointnumberPoint to set the color at (0-1)
colorColorColor to set at the point