-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathindex3d.html
69 lines (57 loc) · 1.67 KB
/
index3d.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
<!doctype html>
<html lang="en">
<head>
<title>Ambient Guilloche</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<style>
* {
background-color: #000000;
margin: 0px;
padding: 0px;
white-space: nowrap;
}
</style>
</head>
<body>
<div id="guilloche"></div>
<script type="x-shader/x-vertex" id="vertextemplate">
#ifdef GL_ES
precision highp float;
#endif
attribute float theta;
uniform float amplitude,zoom,R,Rs,r,rs,p,ps;
varying vec3 vNormal;
void main() {
vNormal = normal;
float rr = (R+r) + amplitude;
float rp = (r+p) + sin(amplitude)/31.41592653589793;
float rrr = (R+r)/r;
vec3 nwPosition = vec3({{model}});
vec4 mvPosition = modelViewMatrix * vec4( nwPosition, 1.0 );
gl_PointSize = 1.0;
//gl_PointSize = theta * ( 314.285 / -mvPosition.z );
gl_Position = projectionMatrix * mvPosition;
}
</script>
<script type="x-shader/x-fragment" id="fragmentshader">
#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D texture;
varying vec3 vNormal;
void main() {
vec3 fNormal = vNormal;
gl_FragColor = vec4(1.0 , 1.0 , 1.0 , 1.0);
//gl_FragColor = gl_FragColor * texture2D( texture, gl_PointCoord );
}
</script>
<!-- Scripts -->
<script type="text/javascript" src="three.js"></script>
<script type="text/javascript" src="ease.js"></script>
<script type="text/javascript" src="mic.js"></script>
<script type="text/javascript" src="guilloche3d.js"></script>
<script type="text/javascript" src="animate3d.js"></script>
<script type="text/javascript" src="index3d.js"></script>
</body>
</html>