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
GamesMemoryFind the six pairs: a script deals and keeps score, the cards flip through bound formulas, win to see your moves.
InterfaceDay / Night switchFlick the switch or tap the scene: the sun sets behind the hills, the moon rises, stars come out and the windows light up.
CharactersOwl mascotAn owl that watches your pointer (a script turns its head and eyes), blinks, dozes off when left alone and hops when tapped.
CharactersSlime crowdGlossy slimes asleep until the pointer arrives: eyes open, blink and follow it; click one to squash and bounce.