Templates / Games
Use it in your site
Put the web player next to the file and mount it on a canvas. Apps and games have runtimes too: see Runtimes.
main.jsweb runtime
import init, * as egg from "./player/egg_web.js";
import { mount } from "./player/egg-player.js";
await init();
const bytes = new Uint8Array(await (await fetch("star-catcher.egg")).arrayBuffer());
mount(egg, document.querySelector("canvas"), bytes, { machine: "game" });More templates
See all
GamesSlot machinePull the lever (or SPIN, or Space): the reels spin and stop one by one, three alike pay by the table and a win throws a shower of coins.
GamesPocket pianoOne octave to play with the mouse or the keys A S D F G H J K and W E T Y U: real synthesized notes (audio events), dipping keys and floating notes.
GamesMemoryFind the six pairs: a script deals and keeps score, the cards flip through bound formulas, win to see your moves.
GamesTap to flyTap or press Space to flap through the pipes: a script runs the bird, the pipes and the score; the ready and game-over screens follow its state.