-
Notifications
You must be signed in to change notification settings - Fork 0
/
lancau.html
52 lines (38 loc) · 1.22 KB
/
lancau.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
<!DOCTYPE html>
<head>
<script id="shader-vs" type="x-shader/x-vertex">
attribute vec4 aPosition;
attribute vec2 aTextureCoord;
uniform mat4 uPMatrix;
uniform mat4 uVMatrix;
uniform mat4 uMMatrix;
varying vec2 vTextureCoord;
void main(){
gl_Position = uPMatrix * uVMatrix * uMMatrix * aPosition;
vTextureCoord = aTextureCoord;
}
</script>
<script id="shader-fs" type="x-shader/x-fragment">
precision mediump float;
uniform sampler2D uSampler;
uniform vec3 uColor;
varying vec2 vTextureCoord;
void main(){
vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));
gl_FragColor = textureColor * vec4( 1.0);
}
</script>
<style type="text/css"
src ="cv.css ">
</style>
<script type="text/javascript" src = "lib/glMatrix-0.9.5.min.js"></script>
<script type="text/javascript" src = "lib/cuon-matrix.js"></script>
<script type="text/javascript" src = "lib/three.js"></script>
</head>
<body onload="main();">
<canvas id="webgl" width="500" height="500" style="position: absolute; z-index: 0"></canvas>
<canvas id="hud" width="500" height="500" style="position: absolute; z-index: 1"></canvas>
<div id="world">heloo...</div>
<script type="text/javascript" src = "java.js"></script>
</body>
</html>