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

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.


readonly inverse: boolean

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

Initial inverse-mask state.


readonly node: DisplayContainer

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

true → attachMask 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

Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/renderer.md.