MaskOptionsAndMask combines MaskOptions with a Mask for configuring masking behavior. Used when setting up complex masking effects with additional options.
sprite.setMask({ mask: graphics, inverse: true,});// Clear existing masksprite.setMask({ mask: null, inverse: false,}); Copy
sprite.setMask({ mask: graphics, inverse: true,});// Clear existing masksprite.setMask({ mask: null, inverse: false,});
Whether the mask should be inverted. When true, the masked area becomes transparent and the unmasked area becomes visible.
false Copy
false
// Invert the masksprite.setMask({ mask: graphics, inverse: true}); Copy
// Invert the masksprite.setMask({ mask: graphics, inverse: true});
The mask to apply, which can be a Container or null.
If null, it clears the existing mask.
// Set a masksprite.setMask({ mask: graphics, inverse: false, Copy
// Set a masksprite.setMask({ mask: graphics, inverse: false,
MaskOptionsAndMask combines MaskOptions with a Mask for configuring masking behavior. Used when setting up complex masking effects with additional options.
Example
See