PIXI.filters.BlurFilter
class BlurFilter extends PIXI.Filter
The BlurFilter applies a Gaussian blur to an object.
The strength of the blur can be set for the x-axis and y-axis separately.
Constructor
new PIXI.filters.BlurFilter(strength: number, quality: number, resolution, kernelSize: number) → {}
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
strength | number | 8 |
The strength of the blur filter. |
|
quality | number | 4 |
The quality of the blur filter. |
|
resolution |
<optional> |
PIXI.settings.FILTER_RESOLUTION |
The resolution of the blur filter. |
|
kernelSize | number | 5 |
The kernelSize of the blur filter.Options: 5, 7, 9, 11, 13, 15. |
Summary
Properties from BlurFilter
PIXI.BLEND_MODES |
|
number |
|
number |
|
number |
|
number |
|
boolean |
|
Methods from BlurFilter
void |
|
Properties inherited from Filter
boolean |
|
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
blendMode: PIXI.BLEND_MODES = PIXI.BLEND_MODES.NORMAL
Sets the blendmode of the filter
blur: number = 2
Sets the strength of both the blurX and blurY properties simultaneously
quality: number = 1
Sets the number of passes for blur. More passes means higher quality bluring.
repeatEdgePixels: boolean = false
If set to true the edge of the target will be clamped
Public Methods
apply(filterManager: PIXI.FilterSystem, input: PIXI.RenderTexture, output: PIXI.RenderTexture, clearMode: PIXI.CLEAR_MODES) → {void}
Applies the filter.
Name | Type | Description |
---|---|---|
filterManager | PIXI.FilterSystem |
The manager. |
input | PIXI.RenderTexture |
The input target. |
output | PIXI.RenderTexture |
The output target. |
clearMode | PIXI.CLEAR_MODES |
How to clear |
Type | Description |
---|---|
void |