-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
118 lines (117 loc) · 5 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
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="utf-8">
<title>snake 3d</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta content="no-cache" http-equiv="Pragma"/>
<meta content="no-cache, no-store, must-revalidate" http-equiv="Cache-Control"/>
<meta content="0" http-equiv="Expires"/>
<script src="plugins/jquery-1.12.2.min.js"></script>
<link href="snake/snake.css" rel="stylesheet" type="text/css"/>
<link href="plugins/bootstrap/css/dark.bootstrap.css" rel="stylesheet" type="text/css"/>
<script src="plugins/bootstrap/js/bootstrap.min.js"></script>
<script src="plugins/three.min.js"></script>
<script src="snake/storage.js"></script>
<script src="snake/trans.js"></script>
<script src="snake/draw.js"></script>
<script src="snake/snake.js"></script>
<!--
<script src="plugins/hammer/hammer.min.js"></script>
<script src="plugins/hammer/jquery.hammer.js"></script>
-->
</head>
<body>
<nav class="navbar navbar-inverse text-capitalize">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-main-menu" aria-expanded="false">
<span class="sr-only">Menu</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Snake 3D</a>
</div>
<div class="collapse navbar-collapse" id="bs-main-menu">
<ul class="nav navbar-nav">
<li><a id="mensaje"></a></li>
</ul>
<label class="btn btn-default navbar-btn btn-block visible-xs">
<input id="collide" type="checkbox" autocomplete="off" checked> <span data-lang="chocar"></span>
</label>
<ul class="nav navbar-nav navbar-right">
<li><a id="start" href="#" data-lang="iniciar"></a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<span data-lang="idioma"></span> <span class="caret"></span>
</a>
<ul id="lang" class="dropdown-menu"></ul>
</li>
</ul>
<label class="btn btn-default navbar-right navbar-btn hidden-xs">
<input id="collide" type="checkbox" autocomplete="off" checked> <span data-lang="chocar"></span>
</label>
</div>
</div>
</nav>
<div class="container">
<!-- <div class="container-fluid col-md-8 col-xs-9"> -->
<div class="col-md-8 col-sm-12 col-sm-offset-0 col-xs-9 col-xs-offset-15">
<div class="row">
<div class="row form-group">
<div class="text-left col-xs-6 col-sm-6">
<label id="points" class="btn btn-default"><strong data-lang="puntos"></strong> <span class="badge"></span></label>
</div>
<div class="text-right col-xs-6 col-sm-6">
<label id="score" class="btn btn-primary"><strong data-lang="mejor"></strong> <span class="badge"></span></label>
</div>
</div>
<div class="form-group">
<div class="embed-responsive embed-responsive-4by3">
<canvas class="embed-responsive-item"></canvas>
</div>
</div>
<div class="row form-group">
<div id="snake" class="text-left col-xs-6 col-sm-6">
<label id="x" class="label label-primary"><strong>x:</strong> <span>1</span></label>
<label id="y" class="label label-primary"><strong>y:</strong> <span>1</span></label>
<label id="z" class="label label-primary"><strong>z:</strong> <span>1</span></label>
</div>
<div id="food" class="text-right col-xs-6 col-sm-6">
<label id="x" class="label label-success"><strong>x:</strong> <span>1</span></label>
<label id="y" class="label label-success"><strong>y:</strong> <span>1</span></label>
<label id="z" class="label label-success"><strong>z:</strong> <span>1</span></label>
</div>
</div>
</div>
</div>
<!-- <div class="visible-xs col-xs-3 text-center">
Next feature: mobile panel.
</div> -->
<div class="col-xs-12 col-sm-10 col-sm-offset-1 col-md-4 col-md-offset-0">
<div class="panel text-center">
<h3>Teclas</h3>
<p><kbd>p</kbd>/<kbd>esc</kbd>/<kbd data-lang="espacio"></kbd> : <span data-lang="pausa"></span></p>
<p><kbd>i</kbd>/<kbd>r</kbd>/<kbd>s</kbd> : <span data-lang="iniciar"></span></p>
<p><kbd data-lang="flechas"></kbd> : <span data-lang="mover-xy"></span></p>
<p><kbd>a</kbd>/<kbd>z</kbd> : <span data-lang="entra/sale"></span></p>
<p><kbd>shift</kbd> + <kbd data-lang="flechas"></kbd> : <span data-lang="mover-xz"></span></p>
<p><kbd>ctrl</kbd> + <kbd data-lang="flechas"></kbd> : <span data-lang="mover-yz"></span></p>
</div>
</div>
</div>
<script>
(function(){
for(var val in idiomas) $('<li/>').append($('<a/>',{href:'#','data-val':val}).html(idiomas[val])).appendTo('ul#lang');
$('ul#lang').on('click','a',function(){
storage('lang',this.dataset.val);
$.lang();
});
$('#collide').prop('checked',storage('collide')||false).on('change',function(){
storage('collide',$(this).prop('checked')||null);
});
})();
</script>
</body>
</html>