BackgroundLayer

BackgroundLayer

A PIXI.Container subclass of CanvasLayer responsible for rendering the scene background image. The singleton instance of this class is accessed through canvas.background.

Constructor

new BackgroundLayer()

Source:

Members

(static) layerOptions

Source:

Customize behaviors of this PlaceablesLayer by modifying some behaviors at a class level

img :PIXI.Sprite

Source:

The background image

Type:
  • PIXI.Sprite

isVideo

Source:

Return a Boolean flag for whether the Scene background texture is a Video element

source

Source:

Return the base HTML element which is used to generate the Scene background

Methods

(async, static) createThumbnail(texture) → {String}

Source:

Create a 300px by 100px thumbnail image for this scene background

Parameters:
Name Type Description
texture String

The background texture path

Returns:

base64 image data

Type
String

activate()

Source:

The BackgroundLayer can never be active

(async) draw() → {Promise.<BackgroundLayer>}

Source:

Draw the background image. We first load the image texture and store it in the PIXI loader. Once the requested image has been fully loaded we draw it as a PIXI.Sprite

Returns:

Returns the instance of the Background Layer for convenient chaining

Type
Promise.<BackgroundLayer>

(async) tearDown()

Source: