AssetLoadOperation

View source

Provides operation labels for identifying the kind of request represented by an AssetLoadFail event.

Examples

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) // true

Variants


Saving

View source

Label for a failed asset save request.