-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
138 lines (126 loc) · 3.97 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 lang="en">
<head>
<link href="css/jquery-ui.min.css" rel="stylesheet">
<link href="css/simple-grid.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Share+Tech+Mono" rel="stylesheet">
<style>
* {
font-family: 'Share Tech Mono', monospace !important;
color:rgb(222, 238, 229) !important;
}
body {
background-color: rgb(62, 82, 27) !important;
font-size: 22px !important;
}
</style>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Gnocchi</title>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
<script src="js/preloadjs-0.6.2.min.js"></script>
<script src="js/gl-matrix-min.js"></script>
</head>
<body>
<h1 align="center">Gnocchi</h1>
<center>(...alternative Minecraft.)</center><br/>
<div align="center">
<canvas tabindex="1" id="webglCanvas" style="border: none; background-color: black;" width="800" height="600"></canvas>
</div>
<div>
<br/>
<center>Click canvas to start. <br/> Pan camera - mouse. <br/> Move around map - WASD. <br/> </center>
<center><br/>. . . . <br/></center>
<div class="container">
<div class="row">
<div class="col-2"></div>
<div class="col-8">
<center><h3>Movement Speed</h3></center>
<div id="speedSlider"></div>
</div>
</div>
<div class="row">
<div class="col-2"></div>
<div class="col-8">
<center><h3>Cached Chunks</h3></center>
<div id="cacheSlider"></div>
</div>
</div>
<div class="row">
<div class="col-2"></div>
<div class="col-8">
<center><h3>Field of View</h3></center>
<div id="fovSlider"></div>
</div>
</div>
<div class="row">
<div class="col-2"></div>
<div class="col-8">
<center><h3>X-Axis View Sensitivity</h3></center>
<div id="xAxisSlider"></div>
</div>
</div>
<div class="row">
<div class="col-2"></div>
<div class="col-8">
<center><h3>Y-Axis View Sensitivity</h3></center>
<div id="yAxisSlider"></div>
</div>
</div>
</div>
<h3 align="center">Members</h3>
<ul align="center">Angela Jin (aj445), Newton Ni (cn279), Irene Yoon (ey222)<br/>
</div>
</body>
<script>
$("#speedSlider").slider({
min: 1,
max: 20,
value: 10,
});
$("#cacheSlider").slider({
min: 8,
max: 64,
value: 32,
});
$("#fovSlider").slider({
min: 20,
max: 80,
value: 45,
});
$("#xAxisSlider").slider({
min: 1,
max: 10,
value: 5,
});
$("#yAxisSlider").slider({
min: 1,
max: 10,
value: 5,
});
function getSpeed() {
return 0.05 * $("#speedSlider").slider("value");
}
function getCache() {
return Math.floor($("#cacheSlider").slider("value"));
}
function getFOV() {
return $("#fovSlider").slider("value") * Math.PI / 180.0;
}
function getXAxis() {
return 0.001 * $("#xAxisSlider").slider("value");
}
function getYAxis() {
return 0.001 * $("#yAxisSlider").slider("value");
}
</script>
<script src="chunk.js"></script>
<script src="player.js"></script>
<script src="state.js"></script>
<script src="message.js"></script>
<script src="event.js"></script>
<script src="gl.js"></script>
<script src="main.js"></script>
</html>