Interface: Asset

Asset

A rectangular pixel source from which a Texture may be created.

Methods

element() → {*}

Returns the asset's underlying pixel source. The type varies depending on the Stage types the asset is compatible with.

Returns:
Type
*

height() → {number}

Returns the asset's intrinsic height in CSS pixels.

Returns:
Type
number

isDynamic() → {boolean}

Returns whether the asset is dynamic, i.e., whether the contents of the underlying pixel source may change.

Returns:
Type
boolean

timestamp() → {number}

Returns the asset's timestamp, which increases monotonically whenever the contents of the underlying pixel source change.

Returns:
Type
number

width() → {number}

Returns the asset's intrinsic width in CSS pixels.

Returns:
Type
number

Events

change

Signals that the contents of the underlying pixel source have changed.