-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplay.html
More file actions
135 lines (123 loc) · 6.28 KB
/
Copy pathplay.html
File metadata and controls
135 lines (123 loc) · 6.28 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Force the browser to revalidate every load. Without these, a stale
cached copy of this file (or of the p5 CDN URL it used to point at)
can keep showing the old `addModule` error after a script-tag swap. -->
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<title>Brain Games — Play</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./styles/main.css?v=20260424">
<style>
html, body { height: 100%; overflow: hidden; }
</style>
</head>
<body>
<div class="crt-scanlines" aria-hidden="true"></div>
<header class="top-bar">
<a href="./index.html" class="back-link">◀ BACK TO DECK</a>
<div class="title-chrome" id="game-title">LOADING...</div>
<div class="live-readout" id="live-readout">ATT --- MED ---</div>
</header>
<div class="play-stage">
<div class="tv-set" role="presentation">
<div class="tv-cabinet">
<div class="tv-screen-area">
<div class="tv-brand" aria-hidden="true">BRAINTENDO</div>
<div class="tv-screen-bezel">
<div class="tv-screen-inner">
<div class="tv-crt-surface">
<div id="game-container"></div>
<div class="tv-crt-glare" aria-hidden="true"></div>
<div class="tv-crt-scanlines" aria-hidden="true"></div>
<div class="tv-crt-vignette" aria-hidden="true"></div>
</div>
</div>
</div>
<div class="tv-model-plate" aria-hidden="true">MODEL BT-808 · EEG ENTERTAINMENT SYSTEM</div>
</div>
<div class="tv-control-panel" aria-hidden="true">
<div class="tv-led-row">
<div class="tv-led power-led" title="POWER"></div>
<div class="tv-led-label">POWER</div>
</div>
<div class="tv-channel-readout">
<div class="tv-channel-label">CH</div>
<div class="tv-channel-num" id="tv-channel-num">01</div>
<div class="tv-channel-arrows">
<button type="button" class="tv-ch-arrow" id="btn-ch-prev" aria-label="Previous cartridge" title="Previous cartridge ( [ )">◀</button>
<button type="button" class="tv-ch-arrow" id="btn-ch-next" aria-label="Next cartridge" title="Next cartridge ( ] )">▶</button>
</div>
</div>
<div class="tv-knob-wrap">
<div class="tv-knob is-clickable" data-knob="knob-channel" role="button" tabindex="0" aria-label="Change channel">
<div class="tv-knob-pointer"></div>
</div>
<div class="tv-knob-label">CHANNEL</div>
</div>
<div class="tv-knob-wrap">
<div class="tv-knob" data-knob="knob-volume"><div class="tv-knob-pointer"></div></div>
<div class="tv-knob-label">VOLUME</div>
</div>
<div class="tv-speaker-grille">
<span></span><span></span><span></span><span></span>
<span></span><span></span><span></span><span></span>
<span></span><span></span><span></span><span></span>
<span></span><span></span><span></span><span></span>
<span></span><span></span><span></span><span></span>
<span></span><span></span><span></span><span></span>
</div>
</div>
</div>
<div class="tv-stand" aria-hidden="true"></div>
</div>
</div>
<div class="modal-backdrop hidden" id="gate-modal" role="dialog" aria-modal="true" aria-labelledby="gate-modal-title">
<div class="modal pixel-frame accent-yellow">
<h2 id="gate-modal-title">PLUG IN A BRAIN OR PRESS SIMULATE</h2>
<p class="small">THIS CARTRIDGE NEEDS EEG INPUT TO START.</p>
<div class="actions">
<button type="button" class="pixel-btn accent-chrome" id="modal-muse">CONNECT MUSE</button>
<button type="button" class="pixel-btn" id="modal-sim">USE SIMULATOR</button>
</div>
</div>
</div>
<!-- p5.js core only — p5.sound is deliberately NOT loaded.
None of the cartridges use audio, and `p5.sound.min.js` has a
history of calling `audioContext.audioWorklet.addModule(...)` at
script-load time, which throws
"Cannot read properties of undefined (reading 'addModule')"
in browsers that haven't unlocked an AudioContext yet. Dropping
the include removes the entire failure mode.
If a future game needs audio, guard the import behind a user
gesture (e.g. inject the p5.sound script only after the simulator
or Muse button click) so the AudioContext is already unlocked. -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.7.0/p5.min.js"></script>
<!-- EEG plumbing (data first, then classes). Cache-busted so edits to
the runner or boot scripts always re-fetch — relevant here because
earlier builds of this page loaded a different p5 version and the
browser may still have the old HTML cached. -->
<script src="./core/eegData.js?v=20260424"></script>
<script src="./core/eegSimulator.js?v=20260424"></script>
<script src="./vendor/muse-browser.js?v=20260424"></script>
<script src="./core/museManager.js?v=20260424"></script>
<!-- Shared helpers (window.BGShared). Loaded before any game source so
games can use BGShared.makeSmoother, drawBar, drawCrowd, etc. -->
<script src="./shared/styling90s.js?v=20260424"></script>
<script src="./shared/eegSmoothing.js?v=20260424"></script>
<script src="./shared/hud.js?v=20260424"></script>
<script src="./shared/intro.js?v=20260424"></script>
<script src="./shared/crowd.js?v=20260424"></script>
<!-- Persistent session state (simulator on/off + controller detection). -->
<script src="./core/sessionState.js?v=20260424"></script>
<!-- Runner + play wiring. -->
<script src="./core/gameRunner.js?v=20260429"></script>
<script src="./core/playBoot.js?v=20260424"></script>
</body>
</html>