Templates / Interface
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("pull-to-refresh.egg")).arrayBuffer());
mount(egg, document.querySelector("canvas"), bytes, { machine: "inbox" });More templates
See all
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.
InterfaceThermostat dialTurn the dial (press and sweep around it) or use - and +: it clicks into half-degree steps, stops at the ends, and the glow goes from cool to warm.
InterfaceCar dashboardHold Gas or Up to drive, Brake or Down to stop, Left and Right to signal: a script runs the car and its gearbox, the gauges and road follow it.
InterfaceLo-fi player (sound)Play a lo-fi loop made by code: the record turns, the bars dance to the beat, and pausing stops the sound; Play carries on where it stopped.