summaryrefslogtreecommitdiff
path: root/2026/examples/teleia/index.html
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2026-06-07 20:03:10 -0400
committerLLLL Colonq <llll@colonq>2026-06-07 20:03:10 -0400
commit8cdb8016dedf16caf1bf5ad0eeb9d8b13e00ca2a (patch)
tree37c16b435dccd58f4d7d80926f4641e9a78ac918 /2026/examples/teleia/index.html
parentba560f205799501e95c46b9159e4dcb041c0bb86 (diff)
Update
Diffstat (limited to '2026/examples/teleia/index.html')
-rw-r--r--2026/examples/teleia/index.html35
1 files changed, 35 insertions, 0 deletions
diff --git a/2026/examples/teleia/index.html b/2026/examples/teleia/index.html
new file mode 100644
index 0000000..c548f82
--- /dev/null
+++ b/2026/examples/teleia/index.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
+ <head>
+ <meta charset="UTF-8">
+ <link data-trunk rel="rust" data-wasm-opt="2" data-target-name="game_lib" />
+ <!-- <link data-trunk rel="rust" data-keep-debug="true" /> -->
+ <base data-trunk-public-url />
+ <meta name="theme-color" media="(prefers-color-scheme: light)" content="white">
+ <meta name="theme-color" media="(prefers-color-scheme: dark)" content="#404040">
+ <link rel="icon" href="data:;base64,iVBORw0KGgo=">
+ <link data-trunk rel="css" href="index.css" />
+ <title>TODO TITLE</title>
+ </head>
+ <body>
+ <script>
+ function send_ready() { window.parent.postMessage({op: "ready"}); }
+ function send_started(verb) { window.parent.postMessage({op: "started", verb}); }
+ function send_done(win) { window.parent.postMessage({op: "done", win}); }
+ addEventListener("message", (ev) => {
+ if (ev.data.op == "start") {
+ window.wasmBindings.game_start(ev.data.difficulty);
+ } else {
+ console.log(`unknown message: ${ev.data}`);
+ }
+ });
+ addEventListener("TrunkApplicationStarted", async (event) => {
+ console.log("initialized, starting...");
+ window.wasmBindings.main_js();
+ });
+ </script>
+ <div id="teleia-parent"></div>
+ </body>
+</html>