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("car-dashboard.egg")).arrayBuffer());
mount(egg, document.querySelector("canvas"), bytes, { machine: "drive" });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.
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.
InterfaceRadarA sweeping radar: contacts glow as the beam passes and drift; tap one to lock it and read its bearing, range and speed.