imloaders
v0.1.1
Published
JavaScript's Image Loader Manager.
Downloads
1
Readme
ImLoader
Overview
一个简单易用的图片加载管理器, 可以对图片进行批量加载等操作.
使用
const logos = [];
const loader = new ImLoader();
logos[0] = loader.addImage(logo1);
logos[1] = loader.addImage(logo2);
logos[2] = loader.addImage(logo3);
loader.addCompletionListener((res) => {
const logoZone = [];
for (let i = 0; i < logos.length; i++) {
const rect = getRect(logos[i]);
const imageData = Util.getImageData(context, logos[i], rect);
logoZone.push(new ImageZone(imageData, rect.x, rect.y));
}
this.initProton({ logoZone });
});
loader.start();
License
ImLoader is released under the MIT License. http://www.opensource.org/licenses/mit-license