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.
Properties
Section titled “Properties”attachToTarget
Section titled “attachToTarget”
readonlyattachToTarget:boolean
Defined in: renderer/src/masks/MaskFactory.ts:25
true → attachMask 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.
inverse
Section titled “inverse”
readonlyinverse:boolean
Defined in: renderer/src/masks/MaskFactory.ts:27
Initial inverse-mask state.
readonlynode:Container
Defined in: renderer/src/masks/MaskFactory.ts:13
The pixi Container (typically Graphics or Sprite) used as the mask.
readonlyowned:boolean
Defined in: renderer/src/masks/MaskFactory.ts:18
true → attachMask destroys node on remove().
false (spriteMask) → caller retains ownership; remove() only detaches.
Methods
Section titled “Methods”redraw()?
Section titled “redraw()?”
optionalredraw():void
Defined in: renderer/src/masks/MaskFactory.ts:29
Optional re-draw callback; present only on graphicsMask.
Returns
Section titled “Returns”void