forked from NoiseControllers/agar-clone
-
Notifications
You must be signed in to change notification settings - Fork 13
/
index.html
293 lines (263 loc) · 10.4 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
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Eat cells smaller than you and don't get eaten by the bigger ones, as an MMO">
<meta name="keywords"
content="agario, agar, io, cell, cells, virus, bacteria, blob, game, games, web game, html5, fun, flash">
<meta name="robots" content="index, follow">
<meta name="viewport"
content="minimal-ui, width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta property="fb:app_id" content="677505792353827"/>
<meta property="og:title" content="Agar.io"/>
<meta property="og:description"
content="Eat cells smaller than you and don't get eaten by the bigger ones, as an MMO"/>
<meta property="og:url" content="http://agar.io"/>
<meta property="og:image" content="http://agar.io/img/1200x630.png"/>
<meta property="og:image:width" content="1200"/>
<meta property="og:image:height" content="630"/>
<meta property="og:type" content="website"/>
<title>Agar.io</title>
<link id="favicon" rel="icon" type="image/png" href="favicon-32x32.png"/>
<link href='https://fonts.googleapis.com/css?family=Ubuntu:700' rel='stylesheet' type='text/css'>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="Vector2.js"></script>
<script src="main_out.js?542"></script>
<style>body {
padding: 0;
margin: 0;
overflow: hidden;
}
#canvas {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
width: 100%;
height: 100%;
}
.checkbox label {
margin-right: 10px;
}
form {
margin-bottom: 0px;
}
.btn-play, .btn-settings, .btn-spectate {
display: block;
height: 35px;
}
.btn-play {
width: 85%;
float: left;
}
.btn-settings {
width: 13%;
float: right;
}
.btn-spectate {
display: block;
float: right;
}
#adsBottom {
position: absolute;
left: 0;
right: 0;
bottom: 0;
}
#adsBottomInner {
margin: 0px auto;
width: 728px;
height: 90px;
border: 5px solid white;
border-radius: 5px 5px 0px 0px;
background-color: #FFFFFF;
box-sizing: content-box;
}
.region-message {
display: none;
margin-bottom: 12px;
margin-left: 6px;
margin-right: 6px;
text-align: center;
}
#nick, #locationKnown #region {
width: 65%;
float: left;
}
#locationUnknown #region {
margin-bottom: 15px;
}
#gamemode, #spectateBtn {
width: 33%;
float: right;
}
#helloDialog {
width: 350px;
background-color: #FFFFFF;
margin: 10px auto;
border-radius: 15px;
padding: 5px 15px 5px 15px;
position: absolute;
top: 50%;
left: 50%;
margin-right: -50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
#chat_textbox {
-webkit-transition: all .5s ease-in-out;
-moz-transition: all .5s ease-in-out;
-o-transition: all .5s ease-in-out;
transition: all .5s ease-in-out;
position: absolute;
z-index: 1;
bottom: 10px;
background: rgba(0, 0, 0, .2);
border: 0px;
outline: none;
color: #FFF;
height: 30px;
text-indent: 12px;
left: 10px;
width: 300px;
}
#chat_textbox:focus {
background: rgba(0, 0, 0, .5);
}
#a300x250 {
width: 300px;
height: 250px;
background-repeat: no-repeat;
background-size: contain;
background-position: center center;
}</style>
</head>
<body>
<div id="fb-root"></div>
<div id="overlays"
style="display:none; position: absolute; left: 0; right: 0; top: 0; bottom: 0; background-color: rgba(0,0,0,0.5); z-index: 200;">
<div id="helloDialog">
<form role="form">
<div class="form-group">
<div style="float: left; margin-left: 20px;"><h2>Tomsterley Agario</h2></div>
<div class="fb-like" style="float: right; margin-top: 30px;"
data-href="https://www.facebook.com/playagar.io" data-layout="button" data-action="like"
data-show-faces="true" data-share="true"></div>
<br clear="both"/>
</div>
<div class="form-group">
<input id="nick" class="form-control" placeholder="Nick" maxlength="15"/>
<select id="gamemode" class="form-control" onchange="setGameMode($(this).val());" required>
<option selected value="">FFA</option>
<option value=":teams">Teams</option>
<option value=":experimental">Experimental</option>
</select>
<br clear="both"/>
</div>
<div id="locationUnknown">
<select id="region" class="form-control" onchange="setRegion($('#region').val());" required>
<option selected disabled value=""> -- Select a Region --</option>
<option value="US-Fremont">US West</option>
<option value="US-Atlanta">US East</option>
<option value="BR-Brazil">South America</option>
<option value="EU-London">Europe</option>
<option value="RU-Russia">Russia</option>
<option value="TK-Turkey">Turkey</option>
<option value="JP-Tokyo">East Asia</option>
<option value="CN-China">China</option>
<option value="SG-Singapore">Oceania</option>
</select>
</div>
<div>
<div class="text-muted region-message CN-China">
</div>
</div>
<div class="form-group">
<div>
<a href="uploads.html" class="btn-primary btn btn-info" role="button">Upload Skins</a>
<a href="gallery" class="btn-primary btn btn-info" role="button">Skins Gallery</a>
<p></p>
</div>
<button disabled type="submit" id="playBtn"
onclick="setNick(document.getElementById('nick').value); return false;"
class="btn btn-play btn-primary btn-needs-server">Play
</button>
<button onclick="$('#settings, #instructions').toggle();return false;"
class="btn btn-info btn-settings"><i class="glyphicon glyphicon-cog"></i></button>
<br clear="both"/>
</div>
<div id="settings" class="checkbox" style="display:none;">
<div class="form-group" id="mainform">
<div id="locationKnown"></div>
<button id="spectateBtn" onclick="spectate(); return false;" disabled
class="btn btn-warning btn-spectate btn-needs-server">Spectate
</button>
<br clear="both"/>
</div>
<div style="margin: 6px;">
<label><input type="checkbox" onchange="setSkins(!$(this).is(':checked'));"> No skins</label>
<label><input type="checkbox" onchange="setNames(!$(this).is(':checked'));"> No names</label>
<label><input type="checkbox" onchange="setDarkTheme($(this).is(':checked'));"> Dark Theme</label>
<label><input type="checkbox" onchange="setColors($(this).is(':checked'));"> No colors</label>
<label><input type="checkbox" onchange="setShowMass($(this).is(':checked'));"> Show mass</label>
<label><input type="checkbox" onchange="setHideChat($(this).is(':checked'));"> Hide chat</label>
<label><input type="checkbox" onchange="setSmooth($(this).is(':checked'));"> Smooth Render</label>
</div>
</div>
</form>
<div id="instructions">
<hr/>
<center><span class="text-muted">
This game is currently in</br>
development by</br>
tomsterley</br>
</span></center>
</div>
<hr/>
<center>
<center>
<span class="text-muted">
</span>
</center>
<div>
</div>
<small class="text-muted text-center"></small>
</center>
<hr style="margin-bottom: 7px; "/>
<div style="margin-bottom: 5px; line-height: 32px; margin-left: 6px; height: 32px;">
<center>
<a href="privacy.txt" class="text-muted">Privacy</a>
|
<a href="terms.txt" class="text-muted">Terms of Service</a>
|
<a href="changelog.txt" class="text-muted">Changelog</a>
</center>
</div>
</div>
</div>
<div id="connecting"
style="display:none;position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: 100; background-color: rgba(0,0,0,0.5);">
<div style="width: 350px; background-color: #FFFFFF; margin: 100px auto; border-radius: 15px; padding: 5px 15px 5px 15px;">
<h2>Connecting</h2>
<p> If you cannot connect to the servers, check if you have some anti virus or firewall blocking the connection.
</div>
</div>
<canvas id="canvas" width="800" height="600"></canvas>
<input type="text" id="chat_textbox" maxlength="200" placeholder="Press Enter to chat!"/>
<div style="font-family:'Ubuntu'"> </div>
</body>
<script type="text/javascript">
$('input').keypress(function(e) {
if (e.which == '13') {
e.preventDefault();
if (!isSpectating) setNick(document.getElementById('nick').value);
}
});
</script>
</html>