-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.html
More file actions
50 lines (39 loc) · 1.1 KB
/
main.html
File metadata and controls
50 lines (39 loc) · 1.1 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Project 2</title>
<script id="vshader" type="x-shader/x-vertex">
attribute vec4 vPosition;
attribute vec4 vColor;
uniform float vPointSize;
uniform mat4 projMatrix;
uniform mat4 modelMatrix;
varying vec4 fColor;
void main() {
gl_Position = projMatrix * modelMatrix * vPosition;
gl_PointSize = vPointSize;
fColor = vColor;
}
</script>
<script id="fshader" type="x-shader/x-fragment">
precision mediump float;
varying vec4 fColor;
void main()
{
gl_FragColor = fColor;
}
</script>
<script src="lib/webgl-utils.js"></script>
<script src="lib/initShaders.js"></script>
<script src="lib/MV.js"></script>
<script src="script.js"></script>
</head>
<body style="text-align: center" onload="main()">
<h1 id="title">CS 4731 Project 2</h1>
<canvas style="border: black solid 1px; background: black" id="webgl" width="400" height="400">
Please use a browser that supports the "canvas" tag.
</canvas>
<input style="margin: 0 auto; display: block;" type="file" id="file">
</body>
</html>