-
Notifications
You must be signed in to change notification settings - Fork 0
/
threedee.html
39 lines (32 loc) · 1.24 KB
/
threedee.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
<html>
<head>
<title>WebGL</title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<script type="text/javascript" src="./js/webgl/glMatrix-0.9.5.min.js"></script>
<script type="text/javascript" src="./js/webgl/webgl-utils.js"></script>
<script id="shader-fs" type="x-shader/x-fragment">
precision mediump float;
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="./js/webgl/webgl-helpers.js"></script>
<!--script type="text/javascript" src="js/threedee%20safe%20copy.js"></script-->
<script type="text/javascript" src="./js/threedee.js"></script>
</head>
<body onload="webGLStart();" style="margin: 0">
<canvas id="lesson04-canvas" style="margin: 0 ;border: none;" width="500" height="500"></canvas>
</body>
</html>