-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.html
More file actions
312 lines (307 loc) · 15.3 KB
/
Copy pathshell.html
File metadata and controls
312 lines (307 loc) · 15.3 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover">
<link rel="icon" href="data:,">
<title>WINDWARD</title>
<style>
:root {
--ivory: #f2e8cf;
--gold: #d9a441;
--teal: #0e3a40;
--sea: #17555e;
--ink: #10151a;
--danger: #d9534f;
/* top clearance: never less than 34px even when the browser reports
no safe-area inset but still overlays a status bar */
--topsafe: max(calc(env(safe-area-inset-top, 0px) + 8px), 34px);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
width: 100%; height: 100%; overflow: hidden;
background: var(--ink);
font-family: Georgia, 'Times New Roman', serif;
color: var(--ivory);
touch-action: none;
user-select: none; -webkit-user-select: none;
}
#app { position: fixed; inset: 0; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* ---------- HUD ---------- */
#hud { position: absolute; inset: 0; pointer-events: none; display: flex; flex-direction: column; }
#topbar {
display: flex; justify-content: space-between; align-items: center;
padding: var(--topsafe) 10px 4px 10px;
font-size: 15px; text-shadow: 0 1px 3px #000;
}
.res { display: flex; gap: 12px; align-items: center; }
.res b { font-size: 17px; }
#supply { color: var(--gold); } /* Supply: the ore you mine and build with */
#favor { color: #d5ecff; } /* Favor: the god's regard, spends on powers */
.res .favorlabel { color: #d5ecff; }
#wavechip { font-size: 13px; letter-spacing: 1px; opacity: 0.9; text-align: right; }
#priestchip {
pointer-events: auto; position: absolute; bottom: calc(env(safe-area-inset-bottom, 0px) + 14px); right: 10px;
background: rgba(16,21,26,0.72); border: 1px solid rgba(242,232,207,0.35);
border-radius: 10px; padding: 5px 9px; font-size: 12px; text-align: center;
}
#priestchip.adrift { border-color: var(--danger); color: var(--danger); animation: pulse 0.9s infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }
/* ---------- banners / tutorial ---------- */
#banner {
position: absolute; top: calc(var(--topsafe) + 102px);
left: 0; right: 0; text-align: center;
pointer-events: none; opacity: 0; transition: opacity 0.4s;
text-shadow: 0 2px 8px #000;
}
#banner.show { opacity: 1; }
#banner .title { font-size: 15px; letter-spacing: 2px; color: var(--ivory); }
#banner .sub { font-size: 11px; font-style: italic; margin-top: 2px; color: #cfe3e6; }
#banner.poseidon .title { color: #7fd4dd; }
#tutorial {
position: absolute; top: calc(var(--topsafe) + 40px);
left: 50%; transform: translateX(-50%);
max-width: min(92vw, 360px); text-align: center;
pointer-events: none; font-size: 14px; font-style: italic; color: var(--ivory);
/* readable over any water or fog: a proper dark pill */
background: rgba(10, 15, 20, 0.88);
border: 1px solid rgba(242, 232, 207, 0.35);
border-radius: 12px; padding: 9px 14px;
text-shadow: 0 1px 4px #000; opacity: 0; transition: opacity 0.35s;
}
/* the tutorial's pointing hand: a pulsing gold ring + finger */
#tuthand { position: fixed; z-index: 45; width: 52px; height: 52px; pointer-events: none; }
#tuthand .ring {
position: absolute; inset: 0; border: 3px solid var(--gold);
border-radius: 50%; animation: handpulse 1.1s ease-in-out infinite;
box-shadow: 0 0 12px rgba(217,164,65,0.7);
}
#tuthand .finger {
position: absolute; left: 14px; top: 30px; font-size: 26px;
animation: handbob 1.1s ease-in-out infinite;
filter: drop-shadow(0 2px 3px rgba(0,0,0,0.7));
}
@keyframes handpulse { 0%, 100% { transform: scale(0.8); opacity: 0.9; } 50% { transform: scale(1.15); opacity: 0.5; } }
@keyframes handbob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
#tutorial.show { opacity: 1; pointer-events: auto; cursor: pointer; }
#banner.show { pointer-events: auto; cursor: pointer; }
#ticker.show { pointer-events: auto; cursor: pointer; }
#ticker {
position: absolute; top: calc(var(--topsafe) + 170px);
left: 0; right: 0; text-align: center;
font-size: 12px; letter-spacing: 1px; color: #ffd9a0; pointer-events: none;
text-shadow: 0 1px 3px #000; opacity: 0; transition: opacity 0.3s;
}
#ticker.show { opacity: 1; }
/* ---------- bottom: hand + actions ---------- */
#bottombar {
margin-top: auto; pointer-events: auto;
padding: 6px 8px calc(env(safe-area-inset-bottom, 0px) + 8px) 8px;
display: flex; flex-direction: column; gap: 6px;
}
#powers { display: flex; gap: 8px; justify-content: center; }
.powbtn {
pointer-events: auto; background: rgba(16,21,26,0.8); color: var(--ivory);
border: 1px solid rgba(217,164,65,0.6); border-radius: 10px;
font-family: inherit; font-size: 12px; padding: 6px 10px;
}
.powbtn:disabled { opacity: 0.35; }
.powbtn.armed { background: var(--gold); color: var(--ink); }
.powdesc {
display: block; font-size: 9px; font-style: italic; opacity: 0.75;
letter-spacing: 0; margin-top: 2px; max-width: 150px;
}
/* the hand is a compact read-out: build by tapping the MAP, not this.
Tapping a chip twice discards it for 1 favor. */
#hand { display: flex; gap: 5px; justify-content: center; align-items: stretch; }
.piece {
pointer-events: auto; width: 46px; height: 56px; border-radius: 9px;
background: rgba(16,21,26,0.82); border: 1.5px solid rgba(242,232,207,0.4);
color: var(--ivory); font-family: inherit; display: flex; flex-direction: column;
align-items: center; justify-content: center; gap: 2px;
}
.piece.selected { border-color: var(--danger); box-shadow: 0 0 10px rgba(217,83,79,0.6); }
.piece.unaffordable { opacity: 0.4; }
.piece canvas { width: 30px; height: 30px; }
.piece .cost { font-size: 10px; color: var(--gold); }
#handlabel {
text-align: center; font-size: 9px; letter-spacing: 1px; color: rgba(242,232,207,0.55);
margin-top: 2px;
}
#handside { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.sidebtn {
pointer-events: auto; background: rgba(16,21,26,0.8); color: var(--ivory);
border: 1px solid rgba(242,232,207,0.4); border-radius: 10px;
font-family: inherit; font-size: 11px; padding: 6px 8px;
}
.sidebtn:disabled { opacity: 0.35; }
/* the confirm row wears the SAME dress as the context menu: one dark
bordered panel, same button language (player-directed) */
#confirmrow {
display: none;
position: absolute; z-index: 6;
background: rgba(16,21,26,0.92); border: 1px solid rgba(242,232,207,0.35);
border-radius: 14px; padding: 8px; gap: 6px;
}
#confirmrow.shown { display: flex; justify-content: center; }
/* the wind readout rides ABOVE the row so CONFIRM keeps a fixed width
(a changing label made the clamped row jitter and overflow) */
#windread {
position: absolute; top: -24px; left: 50%; transform: translateX(-50%);
white-space: nowrap; font-size: 10px; letter-spacing: 2px; color: var(--gold);
background: rgba(16,21,26,0.92); border: 1px solid rgba(217,164,65,0.4);
border-radius: 9px; padding: 3px 10px; pointer-events: none;
}
#confirmrow button {
pointer-events: auto; font-family: inherit; font-size: 13px; letter-spacing: 1px;
border-radius: 10px; padding: 8px 14px;
background: none; color: var(--ivory); border: 1px solid rgba(242,232,207,0.3);
}
#btn-confirm { background: var(--gold) !important; color: var(--ink) !important; font-weight: bold; border: none !important; }
#btn-rotate-l, #btn-rotate { color: var(--gold); border-color: rgba(217,164,65,0.6); font-size: 17px; padding: 6px 12px; }
.hidden { display: none !important; }
/* ---------- build menu ---------- */
#buildmenu {
position: absolute; left: 50%; transform: translateX(-50%); bottom: 210px;
display: flex; gap: 6px; pointer-events: auto; flex-wrap: wrap;
justify-content: center; max-width: 92vw;
background: rgba(16,21,26,0.92); border: 1px solid rgba(242,232,207,0.35);
border-radius: 14px; padding: 8px;
}
#buildmenu.attap { transform: none; bottom: auto; }
#buildmenu .piecechip canvas { width: 34px; height: 34px; display: block; margin: 0 auto; }
#buildmenu button {
font-family: inherit; background: none; border: 1px solid rgba(242,232,207,0.3);
color: var(--ivory); border-radius: 10px; padding: 6px 8px; font-size: 11px;
display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 58px;
}
#buildmenu button b { color: var(--gold); font-size: 12px; }
#buildmenu button:disabled { opacity: 0.35; }
/* dismiss ✕ in the lower-right corner (player-directed): a flow item
at the end of the bottom row, so it can never clip off-screen */
#buildmenu button.dismissx {
min-width: 0; width: 34px; height: 34px; padding: 0; border-radius: 50%;
align-items: center; justify-content: center; font-size: 16px;
margin-left: auto; align-self: flex-end;
background: none; border: 1px solid rgba(242,232,207,0.5);
color: var(--ivory); line-height: 1;
}
/* the demo puppeteer's visible 'press' on a menu button */
#buildmenu button.demopress {
background: var(--gold) !important; color: var(--ink) !important;
animation: demopress 0.55s ease-in-out infinite;
}
#buildmenu button.demopress b, #buildmenu button.demopress span { color: var(--ink) !important; }
#confirmrow button.demopress { animation: demopress 0.55s ease-in-out infinite; }
@keyframes demopress { 50% { transform: scale(1.08); box-shadow: 0 0 12px rgba(217,164,65,0.9); } }
/* first-discovery glint on the relocated power buttons (once ever) */
#buildmenu button.shimmer { animation: powshine 1.1s ease-in-out 3; }
@keyframes powshine {
0%, 100% { box-shadow: 0 0 0 rgba(217,164,65,0); }
50% { box-shadow: 0 0 14px 3px rgba(217,164,65,0.85); border-color: var(--gold); }
}
/* ---------- screens ---------- */
.screen {
position: absolute; inset: 0; background: rgba(10,14,18,0.92);
display: flex; flex-direction: column; align-items: center; justify-content: center;
gap: 14px; text-align: center; pointer-events: auto; z-index: 10; padding: 24px;
}
.screen h1 { font-size: 40px; letter-spacing: 8px; color: var(--ivory); font-weight: normal; }
.screen h2 { font-size: 18px; letter-spacing: 2px; color: var(--gold); font-weight: normal; }
.screen p { font-size: 14px; max-width: 300px; color: #cfd8d3; line-height: 1.5; }
.screen button {
font-family: inherit; font-size: 16px; letter-spacing: 2px; border: none;
background: var(--gold); color: var(--ink); padding: 12px 22px; border-radius: 12px;
}
/* the rival call to action: play as Poseidon */
#startsea { background: #2e6b74; color: var(--ivory); }
.screen .seedrow { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.screen input {
font-family: monospace; font-size: 14px; width: 110px; text-align: center;
background: rgba(242,232,207,0.1); color: var(--ivory);
border: 1px solid rgba(242,232,207,0.4); border-radius: 8px; padding: 6px;
}
#skipbtn {
position: absolute; top: calc(var(--topsafe) + 112px); left: 10px;
pointer-events: auto; background: rgba(16,21,26,0.6); color: rgba(242,232,207,0.8);
border: 1px solid rgba(242,232,207,0.3); border-radius: 8px;
font-family: inherit; font-size: 11px; letter-spacing: 1px; padding: 5px 10px;
}
#codex {
position: absolute; inset: auto 14px 220px 14px; background: rgba(16,21,26,0.94);
border: 1px solid rgba(217,164,65,0.5); border-radius: 12px; padding: 12px 14px;
font-size: 13px; line-height: 1.5; color: #e8dfc8; pointer-events: auto; z-index: 8;
}
#codex h3 { color: var(--gold); font-size: 14px; letter-spacing: 1px; margin-bottom: 4px; }
</style>
</head>
<body>
<div id="app">
<canvas id="gl"></canvas>
<div id="hud">
<div id="topbar">
<div class="res">
<span style="color: var(--gold)">⎋ <b id="supply">0</b></span>
<span class="favorlabel">✦ <b id="favor">0</b></span>
</div>
<div id="wavechip">SEED <span id="seedchip">------</span><br><span id="waveinfo"></span></div>
</div>
<div id="priestchip" class="hidden">⚉ PRIEST</div>
<div id="banner"><div class="title"></div><div class="sub"></div></div>
<div id="tutorial"></div>
<div id="ticker"></div>
<div id="codex" class="hidden"></div>
<div id="buildmenu" class="hidden"></div>
<div id="bottombar">
<!-- the bottom bar is EMPTY by design (player-directed): powers
live in the thumb context menu, the fleet upgrade in the yard
dialog. The whole screen belongs to the map. -->
<div id="confirmrow">
<div id="windread" class="hidden"></div>
<button id="btn-confirm" class="hidden">CONFIRM</button>
<button id="btn-rotate-l" class="hidden" title="turn left">↺</button>
<button id="btn-rotate" class="hidden" title="turn right">↻</button>
<button id="btn-cancel" class="hidden">CANCEL</button>
</div>
<div id="hand" class="hidden"></div>
</div>
</div>
<button id="skipbtn" class="hidden">SKIP TUTORIAL ▸</button>
<div id="startscreen" class="screen">
<h1>WINDWARD</h1>
<h2>THE AGE OF AIR</h2>
<p id="lorepara" style="max-width:340px; font-style: italic; line-height:1.5;">When the
shipwrights discovered lift, the Air Guild turned to Aeolus, keeper of the winds — and
he bound Odysseus' lost gales into roads across the sky. Cargo began crossing without
paying the sea. Poseidon is passed over, and his forces are rising to collect.
Aeolus needs a Windwright. Bind the air.</p>
<div class="seedrow">SEED <input id="seedinput" maxlength="8" autocomplete="off"></div>
<div style="display:flex; gap:12px;">
<button id="startbtn">BIND THE AIR</button>
<!-- RIDE THE WAVES (the Poseidon presentation mirror) lives in the
code but is de-scoped from the front door (player-directed:
one tight loop for the prototype) -->
</div>
<button id="startdemo" style="background:none; color:var(--ivory); border:1px solid rgba(242,232,207,0.4); font-size:13px; padding:8px 18px;">WATCH A MATCH</button>
<button id="resumebtn" class="hidden" style="background:none; color:var(--gold); border:1px solid var(--gold); font-size:13px; padding:8px 18px;">RESUME YOUR MATCH</button>
<div style="position:absolute; bottom:calc(env(safe-area-inset-bottom, 0px) + 6px); right:10px; font-size:9px; letter-spacing:1px; opacity:0.4;">BUILD @BUILDSTAMP</div>
</div>
<div id="endscreen" class="screen hidden">
<h1 id="endtitle"></h1>
<p id="endtext"></p>
<div class="seedrow">SEED <span id="endseed" style="font-family:monospace"></span></div>
<div style="display:flex; gap:12px; flex-wrap:wrap; justify-content:center;">
<button id="resetbtn">AGAIN</button>
<button id="fightonbtn" class="hidden" style="background:none; color:var(--gold); border:1px solid var(--gold);">REFUSE — FIGHT ON</button>
<button id="menubtn" style="background:none; color:var(--ivory); border:1px solid rgba(242,232,207,0.4);">BACK TO MENU</button>
</div>
</div>
</div>
<script src="vendor/three.min.js"></script>
<script src="vendor/Water.js"></script>
<script>
/* @INJECT_GAME_CODE */
</script>
</body>
</html>