🎨 texture2ddecoder-wasm - CDN Example

📦 Loading from jsDelivr CDN
No npm install required! This example loads the library directly from jsDelivr.

⚠️ Important: This file must be served via HTTP server (not opened directly as file://).
Run: python -m http.server 8000 in the examples directory, then visit http://localhost:8000/cdn-example.html
⏳ Initializing WebAssembly module from CDN...

💡 How This Works

// Import from jsDelivr CDN
import { initialize, decode_bc1 } from
  'https://cdn.jsdelivr.net/npm/texture2ddecoder-wasm@1.2.1/dist/index.mjs';

// Point to WASM files on CDN
await initialize({
  wasmPath: 'https://cdn.jsdelivr.net/npm/texture2ddecoder-wasm@1.2.1/wasm'
});

// Now decode!
const decoded = await decode_bc1(data, width, height);

🚀 Benefits

📌 CDN URLs

🔗 Links