To play an Ova Motion animation on a website, load the WebAssembly runtime (egg_web.js), fetch the .egg file and call mount() on a canvas with the state machine to start. It works in any site or framework, supports pointer, keyboard, gamepad and text input, and mirrors tappable shapes as accessible elements.
- Platform
- Every modern browser
- Binding
- WebAssembly plus egg-player.js
- Draws with
- Canvas 2D, or an exact software renderer
- Same file everywhere
- One .egg plays the same on every runtime
- License
- MIT or Apache-2.0
Mount a file
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("hatch.egg")).arrayBuffer());
const view = mount(egg, document.querySelector("canvas"), bytes, {
machine: "hatch", // "" = the first; null = play the first animation
fit: "contain", // or "layout": the artboard takes the canvas size
});Drive it from your page
view.player.set_bool("loading", true);
view.player.fire("tap");
view.player.vm_set_string("city", "Hà Nội");
view.player.vm_set_number("temperature", 31);| Option | Does |
|---|---|
| artboard | Which artboard of a bundle ("" = the first) |
| renderer | "canvas" (default) or "pixels" (software, exact) |
| onEvent | A function called with every event the file reports |
| semantics | Mirror tappable shapes as accessible elements (default true) |
| sound | Play audio events (default true) |
Last checked against the product on 2026-10-15.



