-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
executable file
·138 lines (128 loc) · 3.66 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<title>ATC-Sim</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<script>
var currentScreen = 0;
function screenDidChange() {
document.getElementById('link').style.display = (currentScreen == 0 ? '' : 'none');
}
var playSound;
var stopSound;
var loopSound;
var wantsExit = false;
var AUDIO_IS_LOADING = true;
(function () {
var sources = [
'data/chopin.ogg',
'data/267528__syseq__good.ogg',
'data/Explosion_Ultra_Bass-Mark_DiAngelo-1810420658.ogg',
'data/Industrial%20Alarm-SoundBible.com-1012301296.ogg',
'data/School_Fire_Alarm-Cullen_Card-202875844.ogg',
];
var objs = [];
var loaded = 0;
var canPlay = (new Audio()).canPlayType('application/ogg');
for (var i = 0; i < sources.length; i++) {
if (!canPlay) {
sources[i] = sources[i].replace(/\.ogg$/, '.mp3');
}
var obj = new Audio(sources[i]);
obj.autoplay = false;
objs.push(obj);
if (i == 0) {
try {
obj.currentTime = 12.5;
}
catch(e) {
}
}
if (i == 3 || i == 4) {
obj.loop = true;
}
if (i == 3) {
obj.volume = .2;
}
if (i == 1) {
obj.volume = .8;
}
if (i == 2) {
obj.volume = .6;
}
obj.canplaythrough = function() {
loaded++;
if (loaded == sources.length) {
AUDIO_IS_LOADING = false;
}
};
}
playSound = function(i, start) {
if (start === undefined) {
start = 0;
}
var s = objs[i];
s.pause();
s.play();
s.currentTime = start;
};
stopSound = function(i) {
var s = objs[i];
s.pause();
s.currentTime = 0;
};
loopSound = function(i) {
var s = objs[i];
if (s.paused) {
playSound(i);
}
};
})();
window.onkeyup = function(event) {
if (event.keyCode === 27) {
wantsExit = true;
}
};
</script>
<style>
body, html {
padding: 0;
margin: 0;
text-align: center;
background-color: black;
font-size: 1px;
}
canvas {
outline: none;
}
#link {
display: inline-block;
position: relative;
left: 0px;
top: -400px;
width: 500px;
height: 70px;
background-color: transparent;
}
</style>
<script src="bower_components/processing/processing.min.js"></script>
</head>
<body>
<script>
if(typeof window.orientation !== 'undefined'){
alert("This game doesn't work too well on mobile.\n\nSorry about that!");
}
</script>
<canvas data-processing-sources="finalproj.pde"></canvas>
<br>
<a href="http://www.pompa-baldi.com/" id='link'> </a>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-61783966-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>