-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsource.html
193 lines (188 loc) · 10.9 KB
/
source.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<title>YESNT</title>
<meta charset="UTF-8">
<meta name="description" content="Your school is pushing their psuedoscientific agenda on you; you must escape before things get worse."/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link href="https://fonts.googleapis.com/css?family=Karla:400,700|Share+Tech+Mono&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./main.css">
<link rel="stylesheet" href="./touch.css">
<script src="./three.min.js" charset="utf-8"></script>
<script src="./bloom-pass/EffectComposer.js"></script>
<script src="./bloom-pass/RenderPass.js"></script>
<script src="./bloom-pass/ShaderPass.js"></script>
<script src="./bloom-pass/CopyShader.js"></script>
<script src="./bloom-pass/LuminosityHighPassShader.js"></script>
<script src="./bloom-pass/UnrealBloomPass.js"></script>
<script type="text/javascript">
if (!localStorage.getItem('[yesnt] options')) {
window.location = './settings.html';
}
const params = new URL(window.location).searchParams;
const devMode = window.location.search.length > 1;
function outputError(msg) {
const errorMsg = document.createElement('div');
errorMsg.classList.add('error');
errorMsg.textContent = msg;
if (document.body) document.body.appendChild(errorMsg);
else document.addEventListener('DOMContentLoaded', e => {
document.body.appendChild(errorMsg);
});
}
window.addEventListener('error', e => outputError(e.message));
window.addEventListener('unhandledrejection', e => outputError(e.reason));
const defaultOptions = {
fov: 75,
sensitivity: 700,
touchSensitivity: 200,
controls: {
default: true,
87: 'forth', // w
65: 'left', // a
83: 'back', // s
68: 'right', // d
16: 'get-up', // shift
70: 'phone', // f
13: 'skip-intro', // enter
8: 'del-code-digit', // backspace
82: 'reset', // r
79: 'om', // o
81: 'inhale', // q
69: 'exhale', // e
32: 'trip', // space
37: 'exp-down', // left
38: 'power-up', // up
39: 'exp-up', // right
40: 'power-down', // down
90: 'pick-up' // z
},
keyNames: {87: 'w', 65: 'a', 83: 's', 68: 'd', 16: 'Shift', 70: 'f', 13: 'Enter',
8: 'Backspace', 82: 'r', 79: 'o', 81: 'q', 69: 'e', 32: 'Space',
37: 'ArrowLeft', 38: 'ArrowUp', 39: 'ArrowRight', 40: 'ArrowDown', 90: 'z'},
material: 0,
abridged: true,
audio: 2
};
let options;
try {
options = JSON.parse(localStorage.getItem('[yesnt] options'));
if (options === null || typeof options !== 'object') throw new Error();
} catch (e) {
options = JSON.parse(JSON.stringify(defaultOptions));
}
function saveOptions() {
localStorage.setItem('[yesnt] options', JSON.stringify(options));
}
if (Object.keys(defaultOptions).filter(prop => {
if (!options.hasOwnProperty(prop)) {
options[prop] = defaultOptions[prop];
return true;
}
}).length) {
saveOptions();
}
</script>
<script src="./speech.js" charset="utf-8"></script>
<script src="./room-setup.js" charset="utf-8"></script>
<script src="./people.js" charset="utf-8"></script>
<script src="./touch.js" charset="utf-8"></script>
<script src="./main.js" charset="utf-8"></script>
</head>
<body class="hide-lungs hide-cant-jump hide-end hide-options hide-pose hide-dev">
<p id="subtitles"></p>
<p id="key-hint" class="hidden"></p>
<p id="hint"></p>
<div class="death-note hide-death-note"><img src="./images/death-icon.svg" alt=":(">You failed to <span id="death-reason">breathe</span>.</div>
<div class="note">
<div class="note-content">
<p>This is a work of fiction. Names, characters, businesses, places, events and incidents are either the products of the author's imagination or used in a fictitious manner. Any resemblance to actual persons, living or dead, or actual events is purely coincidental.</p>
<p>Click/tap the screen iff you believe this.</p>
</div>
</div>
<div id="touch-ui">
<div id="touch-circle" class="touch-target"></div>
<div class="button-wrapper">
<button class="touch-target touch-button options-btn available"><span class="touch-icon options-icon">options</span></button>
<button class="touch-target touch-button" data-sim-key="skip-intro">skip intro</button>
<button class="touch-target touch-button" data-sim-key="get-up">get up</button>
<button class="touch-target touch-button" data-sim-key="phone"><span class="touch-icon pose-icon sim-phone">phone out/away</span></button>
<button class="touch-target touch-button" data-sim-key="exp-up"><span class="touch-icon sim-exp-up">expansion up</span></button>
<button class="touch-target touch-button" data-sim-key="exp-down"><span class="touch-icon sim-exp-down">expansion down</span></button>
<button class="touch-target touch-button" data-sim-key="power-up"><span class="touch-icon pose-icon sim-power-up">power up</span></button>
<button class="touch-target touch-button" data-sim-key="power-down"><span class="touch-icon pose-icon sim-power-down">power down</span></button>
<button class="touch-target touch-button" data-sim-key="reset">reset pose</button>
<button class="touch-target touch-button" data-sim-key="pick-up">pick up light</button>
</div>
<div class="touch-target" id="breathe-interaction">
<div class="breath-direction inhale-label">
<span class="breath-dir-icon"></span>
<span class="breath-label">Inhale</span>
</div>
<div class="breath-direction exhale-label">
<span class="breath-dir-icon"></span>
<span class="breath-label">Exhale</span>
</div>
</div>
</div>
<div id="progress-bar"></div>
<div id="lung-indicator"></div>
<div class="pose-indicator"><span class="expansion-indicator"></span></div>
<div class="cant-jump"><span>Jumping upwards is easy. Landing softly is the hard part.</span></div>
<div class="end clickable">
<div class="wrapper">
<div class="end-reason escape"><h1>You've escaped</h1></div>
<div class="end-reason complete"><h1>Reeducation complete</h1></div>
<div id="stattable" class="stat-table"></div>
<!-- TEMP -->
<p>LEADERBOARD WILL BE CLEARED BECAUSE THIS GAME WIP</p>
<p>Submit your score to the leaderboard:</p>
<p><label>Three-letter/number name: <input type="text" class="input" maxlength="3" id="username" placeholder="YES"></label></p>
<p><label class="url-wrapper">URL (optional): <input type="url" class="input" id="url" placeholder="https://gunn.app/"></label></p>
<p class="problem hidden" id="problem"></p>
<p><button type="button" class="button" id="submit-score">Submit</button></p>
<div class="leaderboard hidden" id="leaderboard"></div>
<p><button type="button" class="button full" id="play-again">Play again</button></p>
<p><a class="button full" href="./leaderboard.html">Full leaderboard</a></p>
</div>
</div>
<div class="options clickable">
<p>Click outside of this panel to close.</p>
<p><button class="button" id="restart">Restart</button></p>
<p><a class="button" href="./settings.html">Gameplay settings</a></p>
<h1>Controls</h1>
<p><button class="button" id="reset-settings">Reset settings</button></p>
<label>FOV <div class="slider-wrapper"><input type="range" id="fov" min="30" max="120"><span id="fov-val"></span></div></label>
<label>Mouse sensitivity <div class="slider-wrapper"><input type="range" id="sensitivity" min="2.2" max="4" step="any"></div></label>
<label>Touch sensitivity <div class="slider-wrapper"><input type="range" id="touch-sensitivity" min="1" max="3" step="any"></div></label>
<h2>Key mappings</h2>
<p>The number keys are used for entering in the code and cannot be reassigned.</p>
<p><span class="key-input" tabindex="0" data-fn="inhale"></span>Inhale</p>
<p><span class="key-input" tabindex="0" data-fn="exhale"></span>Exhale</p>
<p><span class="key-input" tabindex="0" data-fn="skip-intro"></span>Skip intro</p>
<p><span class="key-input" tabindex="0" data-fn="reset"></span>Reset pose</p>
<p><span class="key-input" tabindex="0" data-fn="exp-up"></span>Expansion breath: arms up</p>
<p><span class="key-input" tabindex="0" data-fn="exp-down"></span>Expansion breath: arms down</p>
<p><span class="key-input" tabindex="0" data-fn="power-up"></span>Power breath: arms up</p>
<p><span class="key-input" tabindex="0" data-fn="power-down"></span>Power breath: arms down</p>
<p><span class="key-input" tabindex="0" data-fn="om"></span>Say omm</p>
<p><span class="key-input" tabindex="0" data-fn="get-up"></span>Get up</p>
<p><span class="key-input" tabindex="0" data-fn="phone"></span>Take out/put away phone</p>
<p><span class="key-input" tabindex="0" data-fn="forth"></span>Run forwards</p>
<p><span class="key-input" tabindex="0" data-fn="back"></span>Run backwards</p>
<p><span class="key-input" tabindex="0" data-fn="left"></span>Sidestep left</p>
<p><span class="key-input" tabindex="0" data-fn="right"></span>Sidestep right</p>
<p><span class="key-input" tabindex="0" data-fn="trip"></span>Jump</p>
<p><span class="key-input" tabindex="0" data-fn="pick-up"></span>Pick up light</p>
<p><span class="key-input" tabindex="0" data-fn="del-code-digit"></span>Delete last code digit</p>
<h2>Total stats</h2>
<p><a class="button" href="./leaderboard.html">Global leaderboard</a></p>
<div id="total-stattable" class="stat-table"></div>
<h1>About</h1>
<p>A mysterious YESNT (YESNT Eradication of Students' Nerve Tension) Program has come to your school, and you immediately suspect something going on. You deduce that they are trialing an experimental breathing exercise to brainwash students. As an indepedent citizen, you do not desire to be dictated by a foreign power, so you must egress from the situation promptly!</p>
<p>Your plan: Do the YESNT breathing arms while the instructor is watching, and when she's not, take out your phone and spy on the administration's secret broadcast for the passcode to a door. Get up, which will inevitably attract the attention of the instructor, try the code on every single door, and escape when it works.</p>
<p>Anything is worth having a free mind.</p>
</div>
<div class="note-content dev-note">You have test parameters meant for development enabled, so the game will not save your progress. To undo this, remove the part of the URL after the question mark (?).</div>
</body>
</html>