PIXI.filters.ColorOverlayFilter
class ColorOverlayFilter extends PIXI.Filter
Replace all colors within a source graphic with a single color.
// replaces red with blue
someSprite.filters = [new ColorOverlayFilter(
[1, 0, 0],
[0, 0, 1],
0.001
)];
Constructor
new PIXI.filters.ColorOverlayFilter(color: number | number<Array>, alpha: number) → {}
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
color | number | number<Array> |
<optional> |
0x000000 |
The resulting color, as a 3 component RGB e.g. [1.0, 0.5, 1.0] |
alpha | number |
<optional> |
1 |
The alpha value of the color |
Summary
Properties from ColorOverlayFilter
number |
|
number | number<Array> | Float32Array |
|
Properties inherited from Filter
boolean |
|
PIXI.BLEND_MODES |
|
boolean |
If enabled is true the filter is applied, if false it will not. |
boolean |
|
PIXI.MSAA_QUALITY |
The samples of the filter. |
number |
|
number |
|
PIXI.State |
The WebGL state the filter requires to render. |
Properties inherited from Shader
PIXI.Program |
Program that the shader uses. |
Dict<any> |
|
Methods inherited from Filter
void |
|
Public Properties
color: number | number<Array> | Float32Array = 0x000000
The resulting color, as a 3 component RGB e.g. [1.0, 0.5, 1.0]