-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
75 lines (62 loc) · 1.96 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>3D Earth | WARIODDLY | IØ </title>
<meta name="author" content="WARIODDLY">
<meta name="description" content="Web audio visualizer based on the Three.js library. And the source code is written in TypeScript">
<meta name="keywords" content="WebGL, Three.js, TypeScript, Audio Visualizer, Web Audio API">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
* {
margin: 0;
padding: 0;
}
.author-info {
position: absolute;
top: auto;
bottom: 10px;
left: 10px;
height: auto;
}
.author-info p {
color: white;
font-size: 12px;
}
.author-info a {
color: white;
}
.author-info a:hover {
color: #356b8f;
}
</style>
</head>
<body>
<div class="author-info">
<p>Author: <a href="https://github.com/warioddly" target="_blank">WARIODDLY</a></p>
<p>Source code: <a href="https://github.com/warioddly/3D-Earth-Globe" target="_blank">GitHub</a></p>
</div>
<script id="fragmentShader" type="x-shader/x-vertex">
uniform vec3 glowColor;
varying float intensity;
void main()
{
vec3 glow = glowColor * intensity;
gl_FragColor = vec4( glow, 1.0 );
}
</script>
<script id="vertexShader" type="x-shader/x-vertex">
uniform vec3 viewVector;
uniform float c;
uniform float p;
varying float intensity;
void main()
{
vec3 vNormal = normalize( normalMatrix * normal );
vec3 vNormel = normalize( normalMatrix * viewVector );
intensity = pow( c - dot(vNormal, vNormel), p );
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
}
</script>
</body>
</html>