Class: DynamicCanvasAsset

DynamicCanvasAsset(element)

new DynamicCanvasAsset(element)

Dynamic asset containing a canvas.

Parameters:
Name Type Description
element Element

HTML Canvas element

Implements:

Methods

changed()

Notifies that the contained Canvas element was modified.

Fires:

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