pixi.js
    Preparing search index...

    Class BackgroundSystemAdvanced

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

    Implements

    Index
    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.

    defaultOptions: BackgroundSystemOptions = ...

    default options used by the system

    • get alpha(): number

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

      Returns number

    • set alpha(value: number): void

      Parameters

      • value: number

      Returns void

    • get color(): Color

      The background color to fill if not transparent

      Returns Color

    • set color(value: ColorSource): void

      Parameters

      Returns void

    • get colorRgba(): RgbaArray

      The background color as an [R, G, B, A] array.

      Returns RgbaArray