Class: StaticCanvasAsset

StaticCanvasAsset(element)

new StaticCanvasAsset(element)

Static asset containing a canvas.

Parameters:
Name Type Description
element Element

HTML Canvas element.

Implements:

Methods

destroy()

Destroys the instance.

Implements:

element() → {Element}

Implements:
Returns:
Type
Element

height() → {number}

Retrieves the height of the Asset.

Implements:
Returns:
Type
number

timestamp() → {number}

Retrieves a timestamp which identifies the current version of the Asset. This is used to prevent dynamic textures from refreshing when not necessary.

Implements:
Returns:
Type
number

width() → {number}

Retrieves the width of the Asset.

Implements:
Returns:
Type
number