Class: ColorMapFilter

PIXI.filters.ColorMapFilter

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

new PIXI.filters.ColorMapFilter (colorMap, nearest, mix)

Name Type Default Description
colorMap HTMLImageElement | HTMLCanvasElement | PIXI.BaseTexture | PIXI.Texture optional

The colorMap texture of the filter.

nearest boolean false optional

Whether use NEAREST for colorMap texture.

mix number 1 optional

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

See:

Extends

  • PIXI.Filter

Members

colorMap PIXI.Texture

the colorMap texture

colorSize number readonly

the size of one color slice

mix number

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

nearest boolean

Whether use NEAREST for colorMap texture.

Methods

destroy (destroyBase)

Destroys this filter

Name Type Default Description
destroyBase boolean false optional

Whether to destroy the base texture of colorMap as well

updateColorMap ()

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