INNER CODE UNIT · TypeScript
bootstrap
silvia-odwyer/photon · webpack_demo/src/index.ts:50
const bootstrap = async () => {
let photon: ExtendedPhotonModule;
try {
photon = await loadPhoton();
} catch (error) {
console.error("Failed to initialise Photon WASM module", error);
return;
}
const newImage = new Image();
newImage.src = MainImage;
newImage.style.display = "none";
newImage.onload = () => {
newimg = newImage;
setUpCanvas();
ensureBlendCanvasSize();
};