PIXI.filters.ColorOverlayFilter

class ColorOverlayFilter extends PIXI.Filter

Replace all colors within a source graphic with a single color.
originalfilter


  // replaces red with blue
  someSprite.filters = [new ColorOverlayFilter(
   [1, 0, 0],
   [0, 0, 1],
   0.001
   )];
See:

Constructor


new PIXI.filters.ColorOverlayFilter(color: number | number<Array>, alpha: number) → {}
Parameters:
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
alpha = 0
number | number<Array> | Float32Array
color = 0x000000

Properties inherited from Filter

boolean
autoFit = true
PIXI.BLEND_MODES
blendMode = PIXI.BLEND_MODES.NORMAL
boolean
enabled

If enabled is true the filter is applied, if false it will not.

boolean
legacy
PIXI.MSAA_QUALITY
multisample

The samples of the filter.

number
padding
number
resolution
PIXI.State
state

The WebGL state the filter requires to render.

Properties inherited from Shader

PIXI.Program
program

Program that the shader uses.

Dict<any>
uniforms

Methods inherited from Filter

void
apply(filterManager: PIXI.FilterSystem, input: PIXI.RenderTexture, output: PIXI.RenderTexture, clearMode: PIXI.CLEAR_MODES, _currentState: object)

Public Properties


alpha ColorOverlayFilter.ts:71
alpha: number = 0

The alpha value of the color

color ColorOverlayFilter.ts:44
color: number | number<Array> | Float32Array = 0x000000

The resulting color, as a 3 component RGB e.g. [1.0, 0.5, 1.0]


Powered by webdoc!