-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEditPage.html
86 lines (61 loc) · 1.85 KB
/
EditPage.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<!DOCTYPE html>
<html>
<head>
<title>My Cool Page</title>
<link rel="stylesheet" href ="css01.css"/>
<script type="text/javascript" src="jquery-3.4.0.js"></script>
</head>
<body>
<header>
<h2>Shader Creator</h2>
</header>
<section>
<shdrWin>
<canvas id="canvas" width="1200" height="675"></canvas>
</shdrWin>
<srcEditor>
<textarea class = "srcEdit" id = "fsSource0" spellcheck="false">
precision mediump float;
uniform vec2 resolution;
uniform float time;
vec2 R;
vec2 U;
void main()
{
R = resolution.xy;
U = gl_FragCoord.xy;
vec2 nv = vec2(U.xy - 0.5*R.xy)/R.y;
vec2 uv = U / R;
gl_FragColor = vec4(sin(uv.x), cos(uv.y*2.), 0.2, 1.);
}
</textarea>
<p></p>
<button class="button" onClick = "Recompile()">Compile</button>
<button onCLick = "fb1()">Buffer 1</button>
<button onCLick = "fb2()">Buffer 2</button>
</srcEditor>
<textarea class = "srcEdit" id = "fsSource1" spellcheck="false">
precision mediump float;
uniform vec2 resolution;
uniform float time;
vec2 R;
vec2 U;
void main()
{
R = resolution.xy;
U = gl_FragCoord.xy;
vec2 nv = vec2(U.xy - 0.5*R.xy)/R.y;
vec2 uv = U / R;
gl_FragColor = vec4(1., 0., 0., 1.);
}
</textarea>
</section>
<footer>
<p>By Cole Peterson.</p>
</footer>
<script type="x-shader" src="Frag0.js" id = "fs0"></script>
<script type="x-shader" src="VertexShader.js" id = "vs"></script>
<script src="WebGL.js" id = "wgl"></script>
<script src="Interface.js" id = "wgl"></script>
</body>
</html>