PIXI.filters.ConvolutionFilter
class ConvolutionFilter extends PIXI.Filter
The ConvolutionFilter class applies a matrix convolution filter effect.
A convolution combines pixels in the input image with neighboring pixels to produce a new image.
A wide variety of image effects can be achieved through convolutions, including blurring, edge
detection, sharpening, embossing, and beveling. The matrix should be specified as a 9 point Array.
See https://docs.gimp.org/2.10/en/gimp-filter-convolution-matrix.html for more info.
Constructor
new PIXI.filters.ConvolutionFilter(matrix: Array<number>, width: number, height: number) → {}
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
matrix | Array<number> |
<optional> |
[0,0,0,0,0,0,0,0,0] |
An array of values used for matrix transformation. Specified as a 9 point Array. |
width | number |
<optional> |
200 |
Width of the object you are transforming |
height | number |
<optional> |
200 |
Height of the object you are transforming |
Summary
Properties from ConvolutionFilter
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
matrix: number[]
An array of values used for matrix transformation. Specified as a 9 point Array.