-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
67 lines (58 loc) · 1.56 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
<!doctype html>
<html>
<head>
<meta charset="UTF-8"/>
<script>
var renderHub = null;
var gameLogic = null;
var canvas = null;
var gl = null;
function main()
{
// Initialization Phase
canvas = document.getElementById("canvas");
gl = getGLContext(canvas);
var uintIndex_ext = gl.getExtension("OES_element_index_uint");
if(uintIndex_ext)
console.log("Got extension");
registerEvents();
renderHub = new RenderHub(canvas.width,canvas.height);
renderHub.createDebugResources();
renderHub.loadScene();
// Main Loop
(function update(){
requestAnimFrame(update);
//TODO update game logic
// render new frame
renderHub.render();
})();
}
</script>
<!--
same as <link rel="stylesheet" href="css/style.css">
-->
<style>
@import url(css/style.css);
</style>
</head>
<body onLoad="main()">
<center>
<canvas id="canvas" width="1600" height="900" tabindex='1' style="border: 1px solid #000000; background: white;"> </canvas>
</center>
<!--
load then scripts after the whole document is loaded
-->
<script src="gl-matrix.js"></script>
<script src="webgl-utils.js"></script>
<script src="renderHub.js"></script>
<script src="mesh.js"></script>
<script src="framebuffer.js"></script>
<script src="texture2d.js"></script>
<script src="resourceLoader.js"></script>
<script src="skyDome.js"></script>
<script src="camera.js"></script>
<script src="controls.js"></script>
<script src="ocean.js"></script>
<script src="terrain.js"></script>
</body>
</html>