tsParticles - v4.3.2
    Preparing search index...

    The background cover customization

    interface IBackgroundMaskCover {
        color?: string | IRangeColor;
        draw?: (context: BackgroundDrawContext, delta: IDelta) => void;
        element?:
            | string
            | HTMLCanvasElement
            | OffscreenCanvas
            | HTMLVideoElement
            | HTMLImageElement;
        image?: string;
        opacity: number;
    }

    Implemented by

    Index

    Properties

    color?: string | IRangeColor

    The background color hiding all elements behind, string or IOptionsColor value.

    draw?: (context: BackgroundDrawContext, delta: IDelta) => void

    Custom draw callback for dynamic mask, executed every frame during canvasPaint(). Receives the main canvas context and a delta (faked to { value: 0, factor: 1 } currently).

    element?:
        | string
        | HTMLCanvasElement
        | OffscreenCanvas
        | HTMLVideoElement
        | HTMLImageElement

    External element or CSS selector for dynamic mask source. Auto-drawn via ctx.drawImage() every frame before composite mode is applied.

    image?: string

    The background image hiding all elements behind

    opacity: number

    The opacity of the background