summaryrefslogtreecommitdiff
path: root/2026/games_submissions/asrael_io/source/index.html
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2026-08-26 23:47:59 -0400
committerLLLL Colonq <llll@colonq>2026-08-26 23:47:59 -0400
commit0d2d8cd897e94bd94e0b3ae7c6ce9aa580a44a0a (patch)
treee9039d1c3aedca515d6cb499451d4b73aca4f5fd /2026/games_submissions/asrael_io/source/index.html
parent242943e5b023ce40eb3be826c418a478d4672f78 (diff)
Add a_tension_span
Diffstat (limited to '2026/games_submissions/asrael_io/source/index.html')
-rw-r--r--2026/games_submissions/asrael_io/source/index.html53
1 files changed, 53 insertions, 0 deletions
diff --git a/2026/games_submissions/asrael_io/source/index.html b/2026/games_submissions/asrael_io/source/index.html
new file mode 100644
index 0000000..5002f27
--- /dev/null
+++ b/2026/games_submissions/asrael_io/source/index.html
@@ -0,0 +1,53 @@
+<!doctype html>
+<html>
+ <head>
+ <link data-trunk rel="scss" href="index.scss" />
+ <link data-trunk rel="rust" />
+ <script>
+ window.jamStart = false;
+ window.jamDifficulty = 0;
+ window.jamShouldStart = () =>
+ window.jamStart || Boolean(window.lcolonqJamStart);
+ window.jamGetDifficulty = () => {
+ if (window.jamDifficulty) return window.jamDifficulty;
+ if (typeof window.lcolonqJamStart === "number") return window.lcolonqJamStart;
+ return 0;
+ };
+ window.jamStarted = (verb) => window.parent.postMessage({op: "started", verb});
+ window.jamDone = (win) => window.parent.postMessage({op: "done", win});
+
+ window.addEventListener("message", (e) => {
+ if (e.data && e.data.op === "start") {
+ window.jamStart = true;
+ if (typeof e.data.difficulty === "number") {
+ window.jamDifficulty = e.data.difficulty;
+ }
+ }
+ });
+
+ if (window.parent === window) {
+ window.jamStart = true;
+ window.jamDifficulty = Math.floor(Math.random() * 8);
+ console.log("difficulty", window.jamDifficulty);
+ } else {
+ window.parent.postMessage({op: "ready"});
+ }
+
+ const fit = () => {
+ const c = document.querySelector("canvas");
+ if (!c) {
+ requestAnimationFrame(fit);
+ return;
+ }
+
+ const r = Math.max(
+ 1,
+ Math.min(Math.floor(innerWidth / 240), Math.floor(innerHeight / 160), 4),
+ );
+ c.style.transform = `translate(-50%, -50%) scale(${r})`;
+ };
+ window.addEventListener("resize", fit);
+ fit();
+ </script>
+ </head>
+</html>