-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
51 lines (47 loc) · 1.49 KB
/
Copy pathindex.html
File metadata and controls
51 lines (47 loc) · 1.49 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
51
<!DOCTYPE HTML>
<html>
<head><title>keyboard</title></head>
<body>
<script src="script/block.js"></script>
<script src="script/keyvalue.js"></script>
<script id="vshader" type="x-shader/x-vertex">
attribute vec2 vpos;
varying vec2 fpos;
void main(){
fpos=vpos;
gl_Position=vec4(vpos,0,1);
}
</script>
<script id="fshader" type="x-shader/x-fragment">
uniform sampler2D us;
uniform sampler2D fre;
varying highp vec2 fpos;
highp float block=106.75/1600.0;
void main(){
highp float x=(fpos.x+1.0)/2.0;
highp float y=(1.0-fpos.y)/2.0;
highp vec4 color=texture2D(us,vec2(x,y));
if(y<0.2 && x<0.8656 && color.x>0.5){
gl_FragColor=texture2D(fre,vec2(x/block/47.0,0.0));
}else if(y>0.2 && y<0.4 && x>0.1 && color.x>0.5){
if(x>0.1+block*12.0)x=0.1+block*12.0;
gl_FragColor=texture2D(fre,vec2((x-0.1)/block/47.0+13.0/47.0,0.0));
}else if(y>0.4 && y<0.6 && x>0.1175 && x<0.849 &&color.x>0.5){
gl_FragColor=texture2D(fre,vec2((x-0.1175)/block/47.0+26.0/47.0,0.0));
}else if(y>0.6 && y<0.8 && x>0.15 && x<0.815625 && color.x>0.5){
gl_FragColor=texture2D(fre,vec2((x-0.15)/block/47.0+37.0/47.0,0.0));
}
else{
gl_FragColor=color;
}
}
</script>
<p style="text-align:center">
<canvas id="transpic"></canvas>
</p>
<div style="text-align:center;">
<textarea id="input" style="width:80%;height:200px;font-size:20px" onkeyup="reRender()">
Hideo Kojima has revealed to IGN Death Stranding is not a horror game and that he is done developing horror games.</textarea>
</div>
</body>
</html>