MaskFilter
class MaskFilter extends BlendFilter
A higher-order filter that applies the output of a filter to a masked region of the destination framebuffer.
The masked region is defined by where-ever the target DisplayObject renders to in the world. For example, if you draw a rectangle in the world and apply a masked-blur filter, the blur filter will apply to pixels in the backdrop within the rectangle. The DisplayObject must render by drawing a solid RGBA channel (see MaskConfig's constructor).
Constructor
new MaskFilter(baseFilter: PIXI.Filter, config: MaskConfig) → {}
| Name | Type | Description |
|---|---|---|
| baseFilter | PIXI.Filter |
The filter being applied. |
| config | MaskConfig |
The configuration for the mask. |
Summary
Properties from MaskFilter
| PIXI.Filter |
|
|
|
|
| boolean |
if base filter is not sensitive to flipping Y axis, you can turn this ON and save a temporary texture bind / drawcall |
Properties inherited from BackdropFilter
| string |
The name of the uniform for the backdrop texture. |
| Float32Array |
If non-null, @pixi/picture will clear the filter's output framebuffer with this RGBA color. |
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
baseFilter: PIXI.Filter
config
safeFlipY: boolean
if base filter is not sensitive to flipping Y axis, you can turn this ON and save a temporary texture bind / drawcall