-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
47 lines (42 loc) · 1.89 KB
/
Copy pathindex.html
File metadata and controls
47 lines (42 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Tilt of Time — a FACTS-H Lab installation</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🏮</text></svg>" />
<link rel="preload" as="image" href="assets/factsh_white.png" />
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div id="stage">
<canvas id="game" width="1280" height="720"></canvas>
</div>
<video id="cam" autoplay playsinline muted></video>
<!-- Pre-game overlays (the in-game screens are drawn on the canvas) -->
<div id="loading" class="overlay">
<div class="ring"></div>
<p id="loadingText">Awakening the camera spirits…</p>
</div>
<div id="error" class="overlay hidden">
<h2 id="errTitle">Could not start</h2>
<p id="errText"></p>
<p class="err-hint">Needs a webcam and a secure context (HTTPS or localhost) in Chrome/Edge.
Allow camera access, then retry.</p>
<button id="retryBtn" class="btn">Retry ▸</button>
</div>
<button id="soundBtn" class="corner-btn" title="Mute / unmute (M)">🔊</button>
<!-- Watchdog: surface a clear message if the engine never finishes loading -->
<script>
window.__totWatchdog = setTimeout(function () {
var l = document.getElementById('loading'), e = document.getElementById('error');
if (l && !l.classList.contains('hidden')) {
document.getElementById('errText').textContent =
"The face-tracking engine didn't finish loading. Check your connection/firewall and reload, and use Chrome or Edge.";
l.classList.add('hidden'); e.classList.remove('hidden');
}
}, 20000);
</script>
<script type="module" src="game.js"></script>
</body>
</html>