UNPKG

@kibeo/loaders.gl-textures

Version:

Framework-independent loaders for compressed and super compressed (basis) textures

10 lines 428 B
import { asyncDeepMap } from './async-deep-map'; export async function deepLoad(urlTree, load, options) { return await asyncDeepMap(urlTree, url => shallowLoad(url, load, options)); } export async function shallowLoad(url, load, options) { const response = await fetch(url, options.fetch); const arrayBuffer = await response.arrayBuffer(); return await load(arrayBuffer, options); } //# sourceMappingURL=deep-load.js.map