LogoPixi’VN
pixi-jsClasses

Class: BackgroundSystem

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/background/BackgroundSystem.d.ts:37

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

Advanced

Implements

Constructors

Constructor

> new BackgroundSystem(): BackgroundSystem

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/background/BackgroundSystem.d.ts:55

Returns

BackgroundSystem

Properties

clearBeforeRender

> clearBeforeRender: boolean

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/background/BackgroundSystem.d.ts:53

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

> static defaultOptions: BackgroundSystemOptions

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/background/BackgroundSystem.d.ts:45

default options used by the system

Accessors

alpha

Get Signature

> get alpha(): number

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/background/BackgroundSystem.d.ts:65

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

Returns

number

Set Signature

> set alpha(value): void

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/background/BackgroundSystem.d.ts:66

Parameters
value

number

Returns

void


color

Get Signature

> get color(): Color

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/background/BackgroundSystem.d.ts:62

The background color to fill if not transparent

Returns

Color

Set Signature

> set color(value): void

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/background/BackgroundSystem.d.ts:63

Parameters
value

ColorSource

Returns

void


colorRgba

Get Signature

> get colorRgba(): RgbaArray

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/background/BackgroundSystem.d.ts:68

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

Returns

RgbaArray

Methods

destroy()

> destroy(): void

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/background/BackgroundSystem.d.ts:73

Internal

destroys the background system

Returns

void

Implementation of

System.destroy


init()

> init(options): void

Defined in: node_modules/pixi.js/lib/rendering/renderers/shared/background/BackgroundSystem.d.ts:60

initiates the background system

Parameters

options

BackgroundSystemOptions

the options for the background colors

Returns

void

Implementation of

System.init