Static variables

staticblobs:BlobList = new BlobList()

staticread onlyfontFormats:Array<String>

staticfonts:FontList = new FontList()

staticread onlyimageFormats:Array<String>

staticimages:ImageList = new ImageList()


staticread onlysoundFormats:Array<String>

staticsounds:SoundList = new SoundList()

staticread onlyvideoFormats:Array<String>

staticvideos:VideoList = new VideoList()

Static methods

staticloadBlob (name:String, done:Blob ‑> Void, ?failed:AssetError ‑> Void, ?pos:PosInfos):Void

staticloadBlobFromPath (path:String, done:Blob ‑> Void, ?failed:AssetError ‑> Void, ?pos:PosInfos):Void

staticloadEverything (callback:Void ‑> Void, ?filter:Dynamic ‑> Bool, ?uncompressSoundsFilter:Dynamic ‑> Bool, ?failed:AssetError ‑> Void):Void

Loads all assets which were detected by khamake. When running khamake (doing so is Kha's standard build behavior) it creates a files.json in the build/{target}-resources directoy which contains information about all assets which were found. The filter parameter can be used to load assets selectively. The Dynamic parameter describes the asset, it contains the very same objects which are listed in files.json. Additionally by default all sounds are decompressed. The uncompressSoundsFilter can be used to avoid that. Uncompressed sounds can still be played using which is recommended for music.

staticloadFont (name:String, done:Font ‑> Void, ?failed:AssetError ‑> Void, ?pos:PosInfos):Void

staticloadFontFromPath (path:String, done:Font ‑> Void, ?failed:AssetError ‑> Void, ?pos:PosInfos):Void

staticloadImage (name:String, done:Image ‑> Void, ?failed:AssetError ‑> Void, ?pos:PosInfos):Void

Loads an image by name which was preprocessed by khamake.



The name as defined by the khafile.


A callback.

staticloadImageFromPath (path:String, readable:Bool, done:Image ‑> Void, ?failed:AssetError ‑> Void, ?pos:PosInfos):Void

Loads an image from a path. Most targets support PNG and JPEG formats.



The path to the image file.


If true, a copy of the image will be kept in main memory for image read operations.


A callback.

staticloadSound (name:String, done:Sound ‑> Void, ?failed:AssetError ‑> Void, ?pos:PosInfos):Void

staticloadSoundFromPath (path:String, done:Sound ‑> Void, ?failed:AssetError ‑> Void, ?pos:PosInfos):Void

staticloadVideo (name:String, done:Video ‑> Void, ?failed:AssetError ‑> Void, ?pos:PosInfos):Void

staticloadVideoFromPath (path:String, done:Video ‑> Void, ?failed:AssetError ‑> Void, ?pos:PosInfos):Void

staticinline reporter (custom:AssetError ‑> Void, ?pos:PosInfos):AssetError ‑> Void