forked from hmin/HexGL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
game.html
118 lines (99 loc) · 3.2 KB
/
game.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="en" manifest="cache.appcache">
<head>
<title>HexGL dev page</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" href="css/fonts.css" type="text/css" charset="utf-8">
<style>
body {
background:#ccc;
padding:0;
margin:0;
overflow:hidden;
font-family:georgia;
text-align:center;
color: #666;
position:fixed;
}
h1 {color: #666 ; }
a { color:skyblue }
canvas { pointer-events:none; }
#overlay{
position: absolute;
z-index: 9999;
top: 0;
left: 0;
width: 100%;
}
</style>
</head>
<body>
<div id="overlay"></div>
<div id="main"></div>
<script src="libs/Three.dev.js"></script>
<script src="libs/ShaderExtras.js"></script>
<script src="libs/postprocessing/EffectComposer.js"></script>
<script src="libs/postprocessing/RenderPass.js"></script>
<script src="libs/postprocessing/BloomPass.js"></script>
<script src="libs/postprocessing/ShaderPass.js"></script>
<script src="libs/postprocessing/MaskPass.js"></script>
<script src="libs/Detector.js"></script>
<script src="libs/Stats.js"></script>
<script src="libs/DAT.GUI.min.js"></script>
<script src="bkcore.coffee/controllers/TouchController.js"></script>
<script src="bkcore.coffee/controllers/OrientationController.js"></script>
<script src="bkcore/Timer.js"></script>
<script src="bkcore/ImageData.js"></script>
<script src="bkcore/Utils.js"></script>
<script src="bkcore/threejs/RenderManager.js"></script>
<script src="bkcore/threejs/Shaders.js"></script>
<script src="bkcore/threejs/Particles.js"></script>
<script src="bkcore/threejs/Loader.js"></script>
<script src="bkcore/hexgl/HUD.js"></script>
<script src="bkcore/hexgl/RaceData.js"></script>
<script src="bkcore/hexgl/ShipControls.js"></script>
<script src="bkcore/hexgl/ShipEffects.js"></script>
<script src="bkcore/hexgl/CameraChase.js"></script>
<script src="bkcore/hexgl/Gameplay.js"></script>
<script src="bkcore/hexgl/tracks/Cityscape.js"></script>
<script src="bkcore/hexgl/HexGL.js"></script>
<script>
var SCREEN_WIDTH = window.innerWidth;
var SCREEN_HEIGHT = window.innerHeight;
var container, hudcontainer;
var hexGL;
function init() {
hudcontainer = document.getElementById("overlay");
container = document.getElementById("main");
hexGL = new bkcore.hexgl.HexGL({
document: document,
width: SCREEN_WIDTH,
height: SCREEN_HEIGHT,
container: container,
overlay: overlay,
quality: bkcore.Utils.getURLParameter('quality'),
difficulty: bkcore.Utils.getURLParameter('difficulty'),
half: bkcore.Utils.getURLParameter('half'),
mode: bkcore.Utils.getURLParameter('mode'),
track: 'Cityscape'
});
hexGL.load({
onLoad: function(){
console.log("ALL LOADED.");
hexGL.init();
hexGL.start();
},
onError: function(s){
console.log("ERROR ON "+s+".");
},
onProgress: function(p, t, n)
{
console.log("LOADED "+t+" : "+n+" ( "+p.loaded+" / "+p.total+" ).");
}
});
}
init();
</script>
</body>
</html>