CanvasLayer

CanvasLayer

An abstract pattern for primary layers of the game canvas to implement

Members

_active :boolean

Source:

Track whether the canvas layer is currently active for interaction

Type:
  • boolean

name

Source:

The canonical name of the CanvasLayer

Methods

activate()

Source:

Activate the CanvasLayer, deactivating other layers and marking this layer's children as interactive

deactivate()

Source:

Deactivate the CanvasLayer, removing interactivity from its children

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

Source:

Draw the canvas layer, rendering its internal components and returning a Promise The Promise resolves to the drawn layer once its contents are successfully rendered.

Returns:
Type
Promise.<CanvasLayer>

tearDown()

Source:

Deconstruct data used in the current layer in preparation to re-draw the canvas