Skip to content

Mask

Defined in: renderer/src/masks/MaskFactory.ts:11

Internal

Internal value returned by a MaskFactory. Bundles the pixi node that will serve as the mask with the metadata attachMask needs to wire it up correctly.

— consumers use rectMask / spriteMask / graphicsMask and never construct this directly.

readonly attachToTarget: boolean

Defined in: renderer/src/masks/MaskFactory.ts:25

trueattachMask parents node under the target via addChild (Pixi requires the mask to be in the display tree). false (spriteMask) → assumes the caller already placed node somewhere appropriate.


readonly inverse: boolean

Defined in: renderer/src/masks/MaskFactory.ts:27

Initial inverse-mask state.


readonly node: Container

Defined in: renderer/src/masks/MaskFactory.ts:13

The pixi Container (typically Graphics or Sprite) used as the mask.


readonly owned: boolean

Defined in: renderer/src/masks/MaskFactory.ts:18

trueattachMask destroys node on remove(). false (spriteMask) → caller retains ownership; remove() only detaches.

optional redraw(): void

Defined in: renderer/src/masks/MaskFactory.ts:29

Optional re-draw callback; present only on graphicsMask.

void