Embed the game
DANGER
Fiasco games currently do not expose an unmount
function for cleanup, so hot reloads of your component will cause memory leaks or strange behavior.
To embed the currently loaded game:
ts
import { mountPausedGame } from "@vaguevoid/tools";
const canvas = document.createElement("canvas");
document.body.appendChild(canvas);
// you can set this in css as well to determine the size of the game. if left out it will be 100vw
canvas.style.width = "400px";
const gameHandle = await mountPausedGame(canvas);
await gameHandle.play();