@avvio-reply/preloader
v1.2.5
Published
Loads resources from a provided list of paths
Downloads
433
Readme
ResourceLoader
Added to Window Object.
Accepts image or audio file paths.
USAGE:
var loader = new [window.]ResourceLoader();
loader.loadAny(
[{"name":'ship', "path":'/content/images/game/ship.png'}
,{"name":'planet', "path":'/content/images/game/planet.png'}
, ...]
/* on loading */
, function(message){
console.log('loading ' + message.pct + '% (' + message.count + ' items)');
}
/* on loaded */
, function(assets){
var ship = assets['ship'];
}
);
###LOCAL DEV:
"@avvio-reply/preloader": "file:///development/node/modules/preloader"