Class: BackgroundSystem

PIXI.BackgroundSystem

The background system manages the background color and alpha of the main view.

Implements

Members

alpha number

The background color alpha. Setting this to 0 will make the canvas transparent.

backgroundColor PIXI.Color

The background color object.

clearBeforeRender boolean

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.

The background color to fill if not transparent.

Methods

init (options) void

initiates the background system

Name Type Description
options PIXI.IRendererOptions

the options for the background colors