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("music-player.egg")).arrayBuffer());
mount(egg, document.querySelector("canvas"), bytes, { machine: "player" });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.
InterfaceWeather cardTap a city: its numbers (view model properties in bound texts) change, the colours slide over and the sky turns to sun, rain or snow.
InterfaceActivity ringsLog a walk, a run or standing time: three rings fill smoothly through view model bindings, and closing all three rains stars.
InterfaceApp onboardingThree first-run screens slide by with page dots; Next steps on, Skip jumps to the end, a dot goes to its page.