pixi.js
    Preparing search index...

    Interface MaskOptionsAndMask

    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 mask
    sprite.setMask({
    mask: null,
    inverse: false,
    });
    interface MaskOptionsAndMask {
        inverse: boolean;
        mask: Mask;
    }

    Hierarchy (View Summary)

    Index

    Properties

    Properties

    inverse: boolean

    Whether the mask should be inverted. When true, the masked area becomes transparent and the unmasked area becomes visible.

    false
    
    // Invert the mask
    sprite.setMask({
    mask: graphics,
    inverse: true
    });
    mask: Mask

    The mask to apply, which can be a Container or null.

    If null, it clears the existing mask.

    // Set a mask
    sprite.setMask({
    mask: graphics,
    inverse: false,