Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
89 lines (89 loc) · 2.73 KB
/
Copy pathindex.html
File metadata and controls
89 lines (89 loc) · 2.73 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pyre</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #000; }
canvas {
display: block;
width: 100%;
height: 100%;
}
#error-overlay {
display: none;
position: fixed;
inset: 0;
background: #0a0500;
color: #e8c8a0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
justify-content: center;
align-items: center;
text-align: center;
padding: 2rem;
}
#error-overlay.visible { display: flex; }
#error-overlay h1 { font-size: 2rem; margin-bottom: 1rem; color: #ffb060; }
#error-overlay p { font-size: 1.1rem; line-height: 1.6; max-width: 500px; }
#error-overlay a { color: #ff8830; }
#controls-tip {
position: fixed;
bottom: 1.5rem;
left: 50%;
transform: translateX(-50%);
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
font-size: 0.8rem;
color: rgba(180, 130, 80, 0.6);
letter-spacing: 0.03em;
pointer-events: none;
transition: opacity 1.5s ease;
white-space: nowrap;
}
#controls-tip span {
color: rgba(220, 170, 100, 0.7);
font-weight: 500;
}
#controls-tip.hidden { opacity: 0; }
</style>
</head>
<body>
<canvas id="canvas"></canvas>
<div id="error-overlay">
<div>
<h1>Pyre requires WebGPU</h1>
<p>
Your browser doesn't support WebGPU yet.
Try <a href="https://www.google.com/chrome/">Chrome 113+</a>,
<a href="https://www.microsoft.com/edge">Edge 113+</a>, or
Safari 18+ (macOS Sequoia).
</p>
</div>
</div>
<div id="controls-tip">
<span>H</span> controls ·
<span>Space</span> pause ·
<span>F</span> fullscreen ·
<span>R</span> reset ·
move mouse to blow
</div>
<script type="module" src="src/main.js"></script>
<script>
// Fade out the controls tip after 5 seconds
setTimeout(() => {
const tip = document.getElementById('controls-tip');
if (tip) tip.classList.add('hidden');
}, 5000);
// Any keypress or click hides it immediately
function hideTip() {
const tip = document.getElementById('controls-tip');
if (tip) tip.classList.add('hidden');
document.removeEventListener('keydown', hideTip);
document.removeEventListener('click', hideTip);
}
document.addEventListener('keydown', hideTip);
document.addEventListener('click', hideTip);
</script>
</body>
</html>