The color
property can be set to a HEX string or to a object, that is the same as the one used in particles.color
options.
This color is set to canvas style background-color
property, if this property is not set the background will be transparent.
The image
property sets the canvas style background-image
property.
This property doesn't have a default value, anyway if you need a background image you need to specify the same CSS syntax with the url()
function.
The opacity
property sets the color
property opacity, so you can set a semi-transparent background.
This value is by default to 1
and it accepts any value between 0
and 1
included.
The position
property sets the canvas style background-position
property.
This link can be useful to set the right value to this property.
The repeat
property sets the canvas style background-repeat
property.
This link can be useful to set the right value to this property.
The size
property sets the canvas style background-size
property.
This link can be useful to set the right value to this property.
This load method is used to load data in the classes used as generic
Optional
data: RecursivePartial<IBackground>the input options
Background
color
opacity
image
position
repeat
size
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 set to canvas style
background-color
property, if this property is not set the background will be transparent.Samples
Opacity
The
opacity
property sets thecolor
property opacity, so you can set a semi-transparent background.This value is by default to
1
and it accepts any value between0
and1
included.Image
The
image
property sets the canvas stylebackground-image
property.This property doesn't have a default value, anyway if you need a background image you need to specify the same CSS syntax with the
url()
function.Samples
Position
The
position
property sets the canvas stylebackground-position
property.This link can be useful to set the right value to this property.
Repeat
The
repeat
property sets the canvas stylebackground-repeat
property.This link can be useful to set the right value to this property.
Size
The
size
property sets the canvas stylebackground-size
property.This link can be useful to set the right value to this property.