@kibeo/loaders.gl-textures
Version:
Framework-independent loaders for compressed and super compressed (basis) textures
20 lines (18 loc) • 683 B
JavaScript
import { ImageLoader } from '@kibeo/loaders.gl-images';
import { getImageUrls } from './load-image';
import { deepLoad } from './deep-load';
export async function loadImageTextureArray(count, getUrl, options = {}) {
const imageUrls = await getImageArrayUrls(count, getUrl, options);
return await deepLoad(imageUrls, ImageLoader.parse, options);
}
export async function getImageArrayUrls(count, getUrl, options = {}) {
const promises = [];
for (let index = 0; index < count; index++) {
const promise = getImageUrls(getUrl, options, {
index
});
promises.push(promise);
}
return await Promise.all(promises);
}
//# sourceMappingURL=load-image-array.js.map