UNPKG

@kibeo/loaders.gl-textures

Version:

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

23 lines (19 loc) 613 B
import { loadLibrary } from '@kibeo/loaders.gl-worker-utils'; export async function loadCrunchModule(options) { const modules = options.modules || {}; if (modules.crunch) { return modules.crunch; } return loadCrunch(options); } let crunchModule; async function loadCrunch(options) { if (crunchModule) { return crunchModule; } let loadCrunchDecoder = await loadLibrary('crunch.js', 'textures', options); loadCrunchDecoder = loadCrunchDecoder || globalThis.loadCrunchDecoder; crunchModule = loadCrunchDecoder(); return crunchModule; } //# sourceMappingURL=crunch-module-loader.js.map