The raw block decoder on its own. To open whole Unity AssetBundles, see the unity-asset-reader demo.
file://).
python -m http.server 8000 in the examples directory, then visit
http://localhost:8000/cdn-example.html
// Import from jsDelivr CDN
import { initialize, decode_bc1 } from
'https://cdn.jsdelivr.net/npm/texture2ddecoder-wasm@1.2.3/dist/index.mjs';
// Point to WASM files on CDN
await initialize({
wasmPath: 'https://cdn.jsdelivr.net/npm/texture2ddecoder-wasm@1.2.3/wasm'
});
// Now decode!
const decoded = await decode_bc1(data, width, height);
https://cdn.jsdelivr.net/npm/texture2ddecoder-wasm/dist/index.mjs
https://cdn.jsdelivr.net/npm/texture2ddecoder-wasm@1.2.3/dist/index.mjs
https://cdn.jsdelivr.net/npm/texture2ddecoder-wasm@1.2.3/wasm/