Crafty.assets

An object containing every asset used in the current Crafty game. The key is the URL and the value is the Audio or Image object.

If loading an asset, check that it is in this object first to avoid loading twice.

Example

var isLoaded = !!Crafty.assets["images/sprite.png"];

See Also