Constructor
new SpriteGradient(values)
Create a new SpriteGradient.
Parameters:
Name | Type | Description |
---|---|---|
values | Object | | Initial values of gradient |
Methods
get(point) → {Sprite}
Get the color on the gradient at a specified point.
Parameters:
Name | Type | Description |
---|---|---|
point | number | Point 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:
Name | Type | Description |
---|---|---|
point | number | Point to set the color at (0-1) |
color | Color | Color to set at the point |