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) → {}
Parameters:
Name Type Description
baseFilter PIXI.Filter

The filter being applied.

config MaskConfig

The configuration for the mask.

Summary


Properties from MaskFilter

PIXI.Filter
baseFilter
config
boolean
safeFlipY

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
backdropUniformName = undefined

The name of the uniform for the backdrop texture.

Float32Array
clearColor = undefined

If non-null, @pixi/picture will clear the filter's output framebuffer with this RGBA color.

Properties inherited from Filter

boolean
autoFit = true
PIXI.BLEND_MODES
blendMode = PIXI.BLEND_MODES.NORMAL
boolean
enabled

If enabled is true the filter is applied, if false it will not.

boolean
legacy
PIXI.MSAA_QUALITY
multisample

The samples of the filter.

number
padding
number
resolution
PIXI.State
state

The WebGL state the filter requires to render.

Properties inherited from Shader

PIXI.Program
program

Program that the shader uses.

Dict<any>
uniforms

Methods inherited from Filter

void
apply(filterManager: PIXI.FilterSystem, input: PIXI.RenderTexture, output: PIXI.RenderTexture, clearMode: PIXI.CLEAR_MODES, _currentState: object)

Public Properties


baseFilter MaskFilter.ts:76
baseFilter: PIXI.Filter
config MaskFilter.ts:76
config
safeFlipY MaskFilter.ts:86
safeFlipY: boolean

if base filter is not sensitive to flipping Y axis, you can turn this ON and save a temporary texture bind / drawcall


Powered by webdoc!