summaryrefslogtreecommitdiff
path: root/2026/index.html
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2026-06-12 04:17:29 -0400
committerLLLL Colonq <llll@colonq>2026-06-12 04:17:29 -0400
commit140f3eeead7f56ce2fd65e727ae638372af97750 (patch)
tree9ec2c0c4c2c4b88c02ab4418e67a10d4ff8986fa /2026/index.html
parent8cdb8016dedf16caf1bf5ad0eeb9d8b13e00ca2a (diff)
Add test server
Diffstat (limited to '2026/index.html')
-rw-r--r--2026/index.html29
1 files changed, 11 insertions, 18 deletions
diff --git a/2026/index.html b/2026/index.html
index 0ea10c8..3216c75 100644
--- a/2026/index.html
+++ b/2026/index.html
@@ -1,18 +1,9 @@
<!DOCTYPE html>
<html lang="en">
- <script type="module">
- window.microgames = [
- {url: "./examples/raylib/output/index.html", loaded: null, ready: false},
- // {url: "./games/bytomancer/index.html", loaded: null, ready: false},
- {url: "./games/mrrobust/index.html", loaded: null, ready: false},
- {url: "./examples/teleia/dist/index.html", loaded: null, ready: false},
- {url: "./examples/godot/output/index.html", loaded: null, ready: false},
- {url: "./examples/js/index.html", loaded: null, ready: false},
- ];
- </script>
<head>
<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">
+ <script type="module" src="./games.js"></script>
<title>Jam Framing Test</title>
<style>
body {
@@ -66,6 +57,7 @@
<iframe id="jam-framing-iframe" width="480" height="320" src="./framing/dist/index.html"></iframe>
</div>
<script type="module">
+ let microgames = window.MICROGAMES.map(g => ({url: g, loaded: null, ready: false}));
let framing = document.getElementById("jam-framing-iframe");
let microgame_index = 0;
let waiting_to_start = null;
@@ -88,14 +80,6 @@
}
framing.style["transform"] = `scale(${factor})`;
}
- resizeView();
- window.addEventListener("resize", resizeView);
- for (let i of iframes) {
- i.addEventListener("load", () => {
- i.contentDocument.body.style["overflow"] = "hidden";
- i.contentDocument.body.style["image-rendering"] = "pixelated";
- });
- }
function loadGame(i) {
if (!microgames[i].loaded) {
@@ -150,6 +134,15 @@
}
}
+ resizeView();
+ window.addEventListener("resize", resizeView);
+ for (let i of iframes) {
+ i.addEventListener("load", () => {
+ i.contentDocument.body.style["overflow"] = "hidden";
+ i.contentDocument.body.style["image-rendering"] = "pixelated";
+ });
+ }
+
window.addEventListener("message", ev => {
console.log(`received message: ${ev.data.op}`);
switch (ev.data.op) {