PIXI.SpriteMaskFilter

class SpriteMaskFilter extends PIXI.Filter

This handles a Sprite acting as a mask, as opposed to a Graphic.

WebGL only.

Constructor


new PIXI.SpriteMaskFilter(sprite: PIXI.Sprite) → {}
Parameters:
Name Type Description
sprite PIXI.Sprite

The target sprite.

new PIXI.SpriteMaskFilter(vertexSrc: string, fragmentSrc: string, uniforms: Dict) → {}
Parameters:
Name Type Attributes Description
vertexSrc string

<optional>

The source of the vertex shader.

fragmentSrc string

<optional>

The source of the fragment shader.

uniforms Dict<any>

<optional>

Custom uniforms to use to augment the built-in ones.

Summary


Properties from SpriteMaskFilter

Methods from SpriteMaskFilter

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

Public Properties


maskMatrix SpriteMaskFilter.ts:38
maskMatrix: PIXI.Matrix

Mask matrix

maskSprite SpriteMaskFilter.ts:72
maskSprite: PIXI.DisplayObject

Sprite mask

Public Methods


apply SpriteMaskFilter.ts:91
apply(filterManager: PIXI.FilterSystem, input: PIXI.RenderTexture, output: PIXI.RenderTexture, clearMode: PIXI.CLEAR_MODES) → {void}

Applies the filter

Parameters:
Name Type Description
filterManager PIXI.FilterSystem

The renderer to retrieve the filter from

input PIXI.RenderTexture

The input render target.

output PIXI.RenderTexture

The target to output to.

clearMode PIXI.CLEAR_MODES

Should the output be cleared before rendering to it.

Returns:
Type Description
void

Powered by webdoc!