Class: MaskData

PIXI.MaskData

Component for masked elements.

Holds mask mode and temporary data about current mask.

new PIXI.MaskData (maskObject)

Create MaskData

Name Type Attributes Default Description
maskObject PIXI.DisplayObject <optional>
null

object that describes the mask

Members

_scissorRect PIXI.Rectangle

Scissor operation above the mask in stack. Null if _scissorCounter is zero, rectangle instance if positive.

_scissorRectLocal PIXI.Rectangle

pre-computed scissor rect does become _scissorRect when mask is actually pushed

autoDetect boolean

Whether we know the mask type beforehand

Default Value:
  • true

enabled boolean

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

filter ISpriteMaskFilter

The sprite mask filter. If set to null, the default sprite mask filter is used.

Default Value:
  • null

isMaskData boolean

Indicator of the type (always true for MaskData objects)

maskObject PIXI.DisplayObject

Which element we use to mask

multisample PIXI.MSAA_QUALITY

Number of samples of the sprite mask filter. If set to null, the sample count of the current render target is used.

Default Value:
  • PIXI.settings.FILTER_MULTISAMPLE

pooled boolean

Whether it belongs to MaskSystem pool

resolution number

Resolution of the sprite mask filter. If set to null or 0, the resolution of the current render target is used.

Default Value:
  • null

Mask type

Methods

copyCountersOrReset (maskAbove) void

Copies counters from maskData above, called from pushMask().

Name Type Attributes Description
maskAbove PIXI.MaskData <optional>

reset () void

Resets the mask data after popMask().