Class BackgroundSystem

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

Memberof

PIXI

Implements

Constructors

Properties

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.

Member

Default


defaultOptions: BackgroundSystemOptions

Accessors

  • get alpha(): number
  • The background color alpha. Setting this to 0 will make the canvas transparent.

    Returns number

    Member

  • set alpha(value): void
  • Parameters

    • value: number

    Returns void

  • get backgroundColor(): Color
  • The background color object.

    Returns Color

  • get color(): ColorSource
  • The background color to fill if not transparent.

    Returns ColorSource

    Member

  • set color(value): void
  • Parameters

    Returns void

Methods

  • Generic destroy methods to be overridden by the subclass

    Returns void

  • initiates the background system

    Parameters

    Returns void

Generated using TypeDoc