attachMask
attachMask(
target,factory):MaskHandle
Defined in: renderer/src/masks/attachMask.ts:25
Apply a mask to any pixi Container. Returns a MaskHandle that
controls the mask’s lifecycle and inverse state.
The high-level setMask methods on the visual components, RenderLayer,
and SceneRenderTree are thin wrappers around this — use those when you
have one of those targets in hand. Reach for attachMask directly when
you only have a raw Container (e.g. UIPanel masking its own root).
Idempotent on remove(). The handle’s setInverse toggles
pixi v8 Container.setMask({ mask, inverse }).
Parameters
Section titled “Parameters”target
Section titled “target”Container