PIXI.filters.ColorMapFilter

class ColorMapFilter extends PIXI.Filter

The ColorMapFilter applies a color-map effect to an object.
originalfilter

See:

Constructor


new PIXI.filters.ColorMapFilter(colorMap: HTMLImageElement | HTMLCanvasElement | PIXI.BaseTexture | PIXI.Texture, nearest: boolean, mix: number) → {}
Parameters:
Name Type Attributes Default Description
colorMap HTMLImageElement | HTMLCanvasElement | PIXI.BaseTexture | PIXI.Texture

<optional>

The colorMap texture of the filter.

nearest boolean

<optional>

false

Whether use NEAREST for colorMap texture.

mix number

<optional>

1

The mix from 0 to 1, where 0 is the original image and 1 is the color mapped image.

Summary


Properties from ColorMapFilter

PIXI.Texture
colorMap
number
colorSize
number
mix = 1

The mix from 0 to 1, where 0 is the original image and 1 is the color mapped image.

boolean
nearest

Whether use NEAREST for colorMap texture.

Methods from ColorMapFilter

void
destroy(destroyBase: boolean)

Destroys this filter

void
updateColorMap()

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

Public Properties


colorMap ColorMapFilter.ts:69
colorMap: PIXI.Texture

the colorMap texture

colorSize ColorMapFilter.ts:60
colorSize: number

The size of one color slice

mix ColorMapFilter.ts:22
mix: number = 1

The mix from 0 to 1, where 0 is the original image and 1 is the color mapped image.

nearest ColorMapFilter.ts:108
nearest: boolean

Whether use NEAREST for colorMap texture.

Public Methods


destroy ColorMapFilter.ts:151
destroy(destroyBase: boolean) → {void}

Destroys this filter

Parameters:
Name Type Attributes Default Description
destroyBase boolean

<optional>

false

Whether to destroy the base texture of colorMap as well

Returns:
Type Description
void
updateColorMap ColorMapFilter.ts:134
updateColorMap() → {void}

If the colorMap is based on canvas , and the content of canvas has changed, then call updateColorMap for update texture.

Returns:
Type Description
void

Powered by webdoc!