Logo


search API (or start typing anywhere)


AssetImage

snow.systems.assets.AssetImage defined in snow.systems.assets.Asset


classextends snow.systems.assets.Asset


 

Properties


image
image : snow.types.ImageData

Methods


destroy
destroy() : Void

loadstatic

load(_system:snow.systems.assets.Assets, _id:String) : snow.api.Promise

load_from_bytesstatic

load_from_bytes(_system:snow.systems.assets.Assets, _id:String, _bytes:snow.api.buffers.Uint8Array) : snow.api.Promise

load_from_pixelsstatic

load_from_pixels(_system:snow.systems.assets.Assets, _id:String, _width:Int, _height:Int, _pixels:snow.api.buffers.Uint8Array) : snow.systems.assets.AssetImage

new

new(_system:snow.systems.assets.Assets, _id:String, _image:snow.types.ImageData) : Void

processorstatic

processor(_app:snow.Snow, _id:String, _data:snow.api.buffers.Uint8Array) : snow.api.Promise
A convenience io processor, using image_info_from_bytes, from the asset module. Promises ImageData

providerstatic

provider(_app:snow.Snow, _path:String) : snow.api.Promise
A default io provider, using image_info_from_load from the asset module. Promises ImageData. Takes an asset path, not an asset id (use assets.path(id))

reload

reload() : snow.api.Promise
Reloads the bytes from the stored id, using the default processor, returning a promise for the asset.

reload_from_bytes

reload_from_bytes(_bytes:snow.api.buffers.Uint8Array) : snow.api.Promise
Reload the asset from bytes

reload_from_pixels

reload_from_pixels(_width:Int, _height:Int, _pixels:snow.api.buffers.Uint8Array) : Void
Reload the asset from already decoded pixels