-
Notifications
You must be signed in to change notification settings - Fork 1
/
scratchPad.html
48 lines (34 loc) · 1.16 KB
/
scratchPad.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
<!DOCTYPE HTML>
<html>
<head>
<title>ScratchPad For MyPure</title>
<!-- Define Vertex Shader -->
<script type="text/javascript" src="javascript/glMatrix-0.9.5.min.js"></script>
<script type="text/javascript" src="javascript/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 src="javascript/webgl-debug.js"></script>
<script src="javascript/J3DIMath.js"></script>
<script src="javascript/Mypure.js"></script>
<link rel="stylesheet" type="text/css" href="css/app.css">
</head>
<body onload="webGLStart();">
<canvas id="canvas" style="border: 1px solid white;" width="1000" height="1000"></canvas>
</body>
</header>