load()
ecs.assets.load(request)
Description
Load an asset.
Parameters
Parameter | Type | Description |
---|---|---|
request | AssetRequest | Asset request |
type AssetRequest = {
id?: Eid
url: string
}
Returns
Promise<Asset>
type Asset = {
// the response blob from the fetch call on remoteUrl
data: Blob
// where we sent fetch to get our asset data blob
remoteUrl?: string
// data url from URL.createObjectURL made from data
localUrl: string
}