Asset Loader
A generic asset loader, made with web games in mind.
Usage
var loader = new Loader();
loader.add(url, options);
loader.before(cachingMiddleware);
loader.after(parsingMiddleware);
loader.load(function (resources) {
});
loader.on('progress', ...);
loader.on('error', ...);
loader.on('load', ...);
loader.on('complete', ...);
Building
You will need to have node and gulp setup on your machine.
Then you can install dependencies and build:
npm i && npm run build
That will output the built distributables to ./dist
.
Supported Browsers
- IE 10+
- FF 13+
- Chrome 20+
- Safari 6+
- Opera 12.1+
To Do:
- IE 9 support
- Video load support
- Multi-source elements (audio/video)