Loading
View sourceLabel for a failed asset load request. This is the default operation for
AssetLoadFail.
Enum
Provides operation labels for identifying the kind of request represented by
an AssetLoadFail event.
import { AssetLoadFail, AssetLoadOperation } from '@wimaengine/asset'
const typeId = 'Texture' // TypeId for the asset family
const assetId = 0 // AssetId for the asset entry
const path = '/textures/player.png'
const reason = 'Network request failed'
const failure = new AssetLoadFail(
typeId,
assetId,
path,
reason,
AssetLoadOperation.Saving
)
console.log(failure.operation === AssetLoadOperation.Saving) // trueLabel for a failed asset load request. This is the default operation for
AssetLoadFail.
Label for a failed asset save request.