-
Notifications
You must be signed in to change notification settings - Fork 280
/
template.html
75 lines (64 loc) · 9.32 KB
/
template.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
<!-- saved from url=(0014)about:internet -->
<html>
<head>
<script id='2d-vertex-shader' type='x-shader/x-vertex'>
void main() {}
</script>
<script id='2d-fragment-shader' type='x-shader/x-fragment'>
void main() {}
</script>
<script type="text/javascript">
function trigger(img) {
var canvas = document.getElementById('canvas');
var gl = canvas.getContext('experimental-webgl');
var gl1 = canvas.getContext('experimental-webgl');
var gl2 = canvas.getContext('experimental-webgl');
var vShader3 = gl1.createShader(gl1.VERTEX_SHADER);
var vShaderScript3 = document.getElementById('2d-vertex-shader');
var vShaderSource3 = vShaderScript3.text;
gl1.shaderSource(vShader3, vShaderSource3);
gl1.compileShader(vShader3);
var vShader4 = gl2.createShader(gl2.VERTEX_SHADER);
var vShaderScript4 = document.getElementById('2d-vertex-shader');
var vShaderSource4 = vShaderScript4.text;
gl2.shaderSource(vShader4, vShaderSource4);
gl2.compileShader(vShader4);
var fShader3 = gl1.createShader(gl1.FRAGMENT_SHADER);
var fShaderScript3 = document.getElementById('2d-fragment-shader');
var fShaderSource3 = fShaderScript3.text;
gl1.shaderSource(fShader3, fShaderSource3);
gl1.compileShader(fShader3);
program1 = gl1.createProgram();
gl1.attachShader(program1,vShader3);
gl1.attachShader(program1,fShader3);
gl1.linkProgram(program1);
gl1.useProgram(program1);
var fShader4 = gl2.createShader(gl2.FRAGMENT_SHADER);
var fShaderScript4 = document.getElementById('2d-fragment-shader');
var fShaderSource4 = fShaderScript4.text;
gl2.shaderSource(fShader4, fShaderSource4);
gl2.compileShader(fShader4);
program2 = gl2.createProgram();
gl2.attachShader(program2,vShader4);
gl2.attachShader(program2,fShader4);
gl2.linkProgram(program2);
gl2.useProgram(program2);
var tex1 = gl1.createTexture();
var tex2 = gl2.createTexture();
<glfuzz>
}
function start() {
var ImageData = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAUDBAgIBggICAgICAgGBwgIBwcHBwcICAkICAgIBwgGBgYHChANCAgOCQgGDRYNDxERExUTCAsWGBYSGBASExIBBQUFBwYHBQgIBRIIBQgSEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEv/AABEIAWgB4AMBIgACEQEDEQH/xAAcAAEBAQEBAQEBAQAAAAAAAAAACAcGBQEEAwL/xABSEAEAAgIBAgMDBwUICxEBAAAAAgMBBAUGERITIQcIMQkUIjJBQlFSYXF1tBUjNDZidIGyJjU3OFNygoOTtcEYJCUnM0NUVZGUoqSxs8PR0hb/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AjPL4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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lHMsZxn44yoDmPef43ksQu5fovieQ5CrGMR27ZwzDvj4ZxG6iU/D6R9PEmJ97goCPvSc1mPL1z1NOWvzGnHS19SvFlWvx+tCq+rytGqGe3ri/Oc5z8fDj4enbHegOpLOH5rR5OmuFtnGbNexXVb3xCcofcszH18Lwe74DtPbF1/f1Lzt3LbNFWvbsV1V5pozOVeMUw8EfD5nq9T2D+1ja6R5HY3dXU19ue3r415Q2ZWxjGPjxZ4o+VnHr9Fm4D9vM72dnb2NmUcRltbFt8ox+riV1krMxj/Jx3aR0N7Z9viukOT6bq0ta3X5uOzi7asndi6v5zTGjPlxjnw+mId8d8MqAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf/Z";
var img = document.createElement('img');
img.src = ImageData;
img.onload = function() {
document.body.appendChild(img);
trigger(img);
};
}
</script>
</head>
<body onload="start();">
<canvas id="canvas" width="100" height="100"></canvas>
</body>
</html>