-
Notifications
You must be signed in to change notification settings - Fork 0
/
JumperMan.html
60 lines (51 loc) · 2.38 KB
/
JumperMan.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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
<title>Jumper Man</title>
<script type="text/javascript" src="./Common/webgl-utils.js"></script>
<script type="text/javascript" src="./Common/initShaders.js"></script>
<script type="text/javascript" src="./Common/MV.js"></script>
<script type="text/javascript" src="./JumperMan.js"></script>
<script type="text/javascript" src="./Controls.js"></script>
<!-- Model helpers -->
<script type="text/javascript" src="./Models/RenderModel.js"></script>
<script type="text/javascript" src="./Models/Circles.js"></script>
<!-- Models -->
<script type="text/javascript" src="./Models/JumperManModel.js"></script>
<script type="text/javascript" src="./Models/SpikeModel.js"></script>
<script type="text/javascript" src="./Models/PlatformModel.js"></script>
<script type="text/javascript" src="./Models/PelletModel.js"></script>
<!-- Physics engine -->
<script type="text/javascript" src="./Physics/Physics.js"></script>
<script type="text/javascript" src="./Physics/Collision.js"></script>
<script type="text/javascript" src="./Physics/Time.js"></script>
<script type="text/javascript" src="./Physics/Gravity.js"></script>
<script type="text/javascript" src="./Physics/Move.js"></script>
<script type="text/javascript" src="./Physics/ShootPellet.js"></script>
<script type="x-shader/x-vertex" id="vertex-shader">
attribute vec4 myPosition;
uniform mat4 tranformation;
void main()
{
gl_Position = tranformation * myPosition;
}
</script>
<script type="x-shader/x-fragment" id="fragment-shader">
precision mediump float;
uniform vec4 color;
void main()
{
gl_FragColor = color;
}
</script>
</head>
<body onload="init()" onkeydown="keyDown(event)" onkeyup="keyUp(event)">
<canvas id="gl-canvas" onclick="canvasClicked(event)">
</canvas></br>
<label id="time-label">
</label></br>
<label id="score-label">
</label>
</body>
</html>