Zum Hauptinhalt springen

assets

Description​

This library includes functions that handle asset management.

Types​

AssetRequest​

ParameterTypeDescription
ideidUnused
urlstringThe url of the asset

AssetStatistics​

ParameterTypeDescription
pendingnumberThe number of pending assets
completenumberThe number of assets that have completed loading
totalnumberThe total number of assets to be loaded

Asset​

ParameterTypeDescription
datablobAsset data
remoteUrlstringWhere the data was fetched from
localUrlstringurl constructed from data

Functions​

load​

Load an asset

ecs.assets.load(assetRequest: AssetRequest) // -> Promise<Asset>

clear​

Clears the request asset from loaded assets.

ecs.assets.clear(assetRequest: AssetRequest) // -> Promise<Asset>

getStatistics​

Gets statistics related to loading assets.

ecs.assets.getStatistics() // -> AssetStatistics