PIXI.filters.ColorMapFilter
class ColorMapFilter extends PIXI.Filter
The ColorMapFilter applies a color-map effect to an object.


Constructor
new PIXI.filters.ColorMapFilter(colorMap: HTMLImageElement | HTMLCanvasElement | PIXI.BaseTexture | PIXI.Texture, nearest: boolean, mix: number) → {}
| 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 |
|
| number |
|
| number |
The mix from 0 to 1, where 0 is the original image and 1 is the color mapped image. |
| boolean |
Whether use NEAREST for colorMap texture. |
Methods from ColorMapFilter
| void |
Destroys this filter |
| void |
|
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> |
|
Public Properties
mix: number = 1
The mix from 0 to 1, where 0 is the original image and 1 is the color mapped image.
Public Methods
destroy(destroyBase: boolean) → {void}
Destroys this filter
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| destroyBase | boolean |
<optional> |
false |
Whether to destroy the base texture of colorMap as well |
| Type | Description |
|---|---|
| void |
updateColorMap() → {void}
If the colorMap is based on canvas , and the content of canvas has changed,
then call updateColorMap for update texture.
| Type | Description |
|---|---|
| void |