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("memory.egg")).arrayBuffer());
mount(egg, document.querySelector("canvas"), bytes, { machine: "memory" });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.
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.