Implements
Members
defaultOptions BackgroundSystemOptions static
default options used by the system
Properties:
Name | Type | Default | Description |
---|---|---|---|
backgroundAlpha |
number |
1
|
WebGLOptions.backgroundAlpha |
backgroundColor |
number |
0x000000
|
WebGLOptions.backgroundColor |
clearBeforeRender |
boolean |
true
|
WebGLOptions.clearBeforeRender |
The background color alpha. Setting this to 0 will make the canvas transparent.
This sets if the CanvasRenderer will clear the canvas or not before the new render pass. If the scene is NOT transparent PixiJS will use a canvas sized fillRect operation every frame to set the canvas background color. If the scene is transparent PixiJS will use clearRect to clear the canvas every frame. Disable this by setting this to false. For example, if your game has a canvas filling background image you often don't need this set.
color Color
The background color to fill if not transparent
colorRgba RgbaArray
The background color as an [R, G, B, A] array.
Methods
initiates the background system
Name | Type | Description |
---|---|---|
options |
BackgroundSystemOptions |
the options for the background colors |