Canvas composite operation values here: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation
Readonly
coverBackground covering color
Background mask enabling options
This load method is used to load data in the classes used as generic
Optional
data: RecursivePartial<IBackgroundMask>the input options
Background Mask
composite
cover
enable
Composite
This property is used to choose the composition mode for the background mask effect.
The default value is
destination-out
, which unveils the background below using drawn elements, any other valid value can be found hereCover
The
cover
property can be set to a HEX string or to a {@link IColor | color object}, that is the same as the one used inparticles.color
options.The
cover
can also be a {@link IBackgroundMaskCover | cover object} like the one described below.color
opacity
Color
The
color
property can be set to a HEX string or to a {@link IColor | color object}, that is the same as the one used inparticles.color
options.This color is used to cover the background set in the
background
section on in a below element, if this property is not set the cover will be transparent.Samples
Opacity
The
opacity
property sets thecolor
property opacity, so you can set a semi-transparent cover.This value is by default to
1
and it accepts any value between0
and1
included.Enable
This property set the background mask mode, this mode enables the
composite
option to all elements drawn.