Skip to content

Commit a9161ab

Browse files
committed
Added temporary mobile homepage
1 parent 9214a94 commit a9161ab

File tree

1 file changed

+175
-0
lines changed

1 file changed

+175
-0
lines changed

mobile.html

+175
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<title>HexGL dev page</title>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
7+
<link rel="stylesheet" href="css/fonts.css" type="text/css" charset="utf-8">
8+
<style>
9+
body {
10+
background:#ccc;
11+
padding:0;
12+
margin:0;
13+
overflow:hidden;
14+
font-family:georgia;
15+
text-align:center;
16+
color: #666;
17+
}
18+
h1 {color: #666 ; }
19+
a { color:skyblue }
20+
/*canvas { pointer-events:none; }*/
21+
html, body, #main, canvas { width: 100%; height: 100%;}
22+
#overlay, #titles{
23+
position: absolute;
24+
z-index: 1000;
25+
top: 0;
26+
left: 0;
27+
bottom: 0;
28+
right: 0;
29+
}
30+
#titles{
31+
z-index: 1001;
32+
}
33+
#titles-logo{
34+
position: absolute;
35+
top: 0;
36+
left: 0;
37+
bottom: 0;
38+
right: 40%;
39+
background: #dedede;
40+
text-align: center;
41+
font-size: 4em;
42+
font-weight: bold;
43+
font-family: arial, sans-serif;
44+
text-decoration: none;
45+
color: #444444;
46+
}
47+
#titles-logo div{
48+
display: block;
49+
top: 50%;
50+
position: absolute;
51+
margin-top: -40px;
52+
line-height: 80px;
53+
width: 100%;
54+
text-align: center;
55+
}
56+
#titles-buttons{
57+
position: absolute;
58+
left: 60%;
59+
width: 40%;
60+
height: 100%;
61+
background: #bcbcbc;
62+
border: none;
63+
border-collapse: collapse;
64+
}
65+
#titles-button tr td{
66+
}
67+
.titles-button{
68+
vertical-align: middle;
69+
text-align: center;
70+
font-size: 2em;
71+
font-weight: bold;
72+
font-family: arial, sans-serif;
73+
text-decoration: none;
74+
color: #444444;
75+
}
76+
.titles-button:hover, .titles-button:active, .titles-button:focus{
77+
background: skyblue;
78+
}
79+
</style>
80+
<link rel="stylesheet" href="css/touchcontroller.css" type="text/css" charset="utf-8">
81+
</head>
82+
83+
<body>
84+
<div id="titles">
85+
<div id="titles-logo"><div>HexGL</div></div>
86+
<table id="titles-buttons">
87+
<tr><td class="titles-button" onclick="init(0);">START LOW</td></tr>
88+
<tr><td class="titles-button" onclick="init(1);">START MID</td></tr>
89+
<tr><td class="titles-button" onclick="init(2);">START HIGH</td></tr>
90+
</table>
91+
</div>
92+
<div id="overlay"></div>
93+
<div id="main"></div>
94+
95+
<script src="libs/Three.dev.js"></script>
96+
<script src="libs/ShaderExtras.js"></script>
97+
<script src="libs/postprocessing/EffectComposer.js"></script>
98+
<script src="libs/postprocessing/RenderPass.js"></script>
99+
<script src="libs/postprocessing/BloomPass.js"></script>
100+
<script src="libs/postprocessing/ShaderPass.js"></script>
101+
<script src="libs/postprocessing/MaskPass.js"></script>
102+
<script src="libs/Detector.js"></script>
103+
<script src="libs/Stats.js"></script>
104+
<script src="libs/DAT.GUI.min.js"></script>
105+
106+
<script src="bkcore.coffee/TouchController.js"></script>
107+
108+
<script src="bkcore/Timer.js"></script>
109+
<script src="bkcore/ImageData.js"></script>
110+
<script src="bkcore/Utils.js"></script>
111+
112+
<script src="bkcore/threejs/RenderManager.js"></script>
113+
<script src="bkcore/threejs/Shaders.js"></script>
114+
<script src="bkcore/threejs/Particles.js"></script>
115+
<script src="bkcore/threejs/Loader.js"></script>
116+
117+
<script src="bkcore/hexgl/HUD.js"></script>
118+
<script src="bkcore/hexgl/RaceData.js"></script>
119+
<script src="bkcore/hexgl/ShipControls.js"></script>
120+
<script src="bkcore/hexgl/ShipEffects.js"></script>
121+
<script src="bkcore/hexgl/CameraChase.js"></script>
122+
<script src="bkcore/hexgl/Gameplay.js"></script>
123+
124+
<script src="bkcore/hexgl/tracks/Cityscape.js"></script>
125+
126+
<script src="bkcore/hexgl/HexGL.js"></script>
127+
128+
<script>
129+
130+
var SCREEN_WIDTH = window.innerWidth;
131+
var SCREEN_HEIGHT = window.innerHeight;
132+
133+
var container, hudcontainer;
134+
135+
var hexGL;
136+
137+
function init(quality) {
138+
document.getElementById("titles").style.display = "none";
139+
hudcontainer = document.getElementById("overlay");
140+
container = document.getElementById("main");
141+
142+
hexGL = new bkcore.hexgl.HexGL({
143+
document: document,
144+
width: SCREEN_WIDTH,
145+
height: SCREEN_HEIGHT,
146+
container: container,
147+
overlay: overlay,
148+
quality: quality,
149+
track: 'Cityscape',
150+
hud: false,
151+
half: true
152+
});
153+
154+
hexGL.load({
155+
onLoad: function(){
156+
console.log("ALL LOADED.");
157+
hexGL.init();
158+
hexGL.start();
159+
},
160+
onError: function(s){
161+
console.log("ERROR ON "+s+".");
162+
},
163+
onProgress: function(p, t, n)
164+
{
165+
console.log("LOADED "+t+" : "+n+" ( "+p.loaded+" / "+p.total+" ).");
166+
}
167+
});
168+
}
169+
170+
//init();
171+
172+
</script>
173+
174+
</body>
175+
</html>

0 commit comments

Comments
 (0)