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("piano.egg")).arrayBuffer());
mount(egg, document.querySelector("canvas"), bytes, { machine: "piano" });More templates
See all
GamesStar CatcherA real little game: catch falling stars in the fox's basket with the mouse or the arrow keys, dodge bombs, grab hearts; combos, levels, a best score.
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.
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.