Class: MaskSystem

PIXI.systems.MaskSystem

System plugin to the renderer to manage masks.

new PIXI.systems.MaskSystem (renderer)

Name Type Description
renderer PIXI.Renderer

The renderer this System works for.

Extends

Members

alphaMaskIndex number readonly

Current index of alpha mask pool

Default Value:
  • 0

alphaMaskPool Array.<PIXI.SpriteMaskFilter> readonly

Pool of used sprite mask filters

enableScissor boolean readonly

Enable scissor

maskDataPool Array.<PIXI.MaskData> readonly

Pool of mask data

The renderer this manager works for.

scissorRenderTarget PIXI.DisplayObject readonly

Target to mask

Methods

destroy () inherited

Generic destroy methods to be overridden by the subclass

detect (maskData)

Sets type of MaskData based on its maskObject

Name Type Description
maskData PIXI.MaskData

pop (target)

Removes the last mask from the mask stack and doesn't return it. Renderer batch must be flushed beforehand.

Name Type Description
target PIXI.DisplayObject

Display Object to pop the mask from

popSpriteMask ()

Removes the last filter from the filter stack and doesn't return it.

push (target, maskData)

Applies the Mask and adds it to the current filter stack. Renderer batch must be flushed beforehand.

Name Type Description
target PIXI.DisplayObject

Display Object to push the mask to

maskData PIXI.MaskData | PIXI.Sprite | PIXI.Graphics | PIXI.DisplayObject

The masking data.

pushSpriteMask (maskData)

Applies the Mask and adds it to the current filter stack.

Name Type Description
maskData PIXI.MaskData

Sprite to be used as the mask

setMaskStack (maskStack)

Changes the mask stack that is used by this System.

Name Type Description
maskStack Array.<PIXI.MaskData>

The mask stack