It is a library for loading files asynchronously.
Using this library, you can asynchronously load all kinds of assets, as well as add animation and callback calls.
const loader = new AssetsLoader({
bg1: `assets/bg1.png`,
fonMus: `assets/fon.mp3
});
loader.Load(callback, Object, errTimeout, AnimationTimeout, Animation );
ctx.drawImage(Object[`bg1`], 0, 0);
- Add animations
- Add even more supported types
Currently only HTMLAudioElement and HTMLImageElement are supported
- Optimize perfomance
At the moment it doesn't make sense to add the last 2 arguments to the load method, namely AnimationTimeout and Animation If you want to cause a delay before the callback, then AnimationTimeout enter the time you need in ms, and in Animation enter any plug, for example, ``