Crafty.asset()
Events
- NewAsset [key and value of new added asset. = {Object}]
- After setting new asset
public void Crafty.asset(String key, Object asset)
- key
asset url.
- asset
Audio
orImage
object.
Add new asset to assets object.
public void Crafty.asset(String key)
- key
asset url.
Get asset from assets object.
Example
Crafty.asset(key, value);
var asset = Crafty.asset(key); //object with key and value fields