-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
57 lines (47 loc) · 1.46 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>WebGL renderer - last updated sometime in 2010</title>
<link rel="stylesheet" href="main.css" media="screen">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js">
jQuery.noConflict();
</script>
<script type="text/javascript" src="sylvester.js"></script>
<script type="text/javascript" src="glUtils.js"></script>
<script id="shader-fs" type="x-shader/x-fragment">
#ifdef GL_ES
precision highp float;
#endif
varying vec4 vColor;
void main(void) {
gl_FragColor = vColor;
}
</script>
<script id="shader-vs" type="x-shader/x-vertex">
attribute vec3 aVertexPosition;
attribute vec4 aVertexColor;
uniform mat4 uMVMatrix;
uniform mat4 uPMatrix;
varying vec4 vColor;
void main(void) {
gl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);
vColor = aVertexColor;
}
</script>
<script type="text/javascript" src="renderer.js"></script>
<script type="text/javascript">
$(document).ready(function() {
r = new Renderer(jQuery('#gl-canvas').get(0));
setInterval(function() {
r.drawScene();
}, 15)
});
</script>
</head>
<body>
<canvas id="gl-canvas" width="500" height="500">
Bad news, everyone. Your console doesn't support Canvas. Get with the times, you.
</canvas>
</body>
</html>