-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
103 lines (69 loc) · 2.75 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Happy Bday Rel</title>
<LINK REL=StyleSheet HREF="css/styles.css" TYPE="text/css" MEDIA=screen>
</head>
<body>
<script src="lib/three.js"></script>
<script src="//connect.soundcloud.com/sdk.js"></script>
<script src="lib/ParticleEngine/ShaderParticles.min.js"></script>
<script src="lib/Detector.js"></script>
<script src="lib/OrbitControls.js"></script>
<script src ="lib/FastBlur.js"></script>
<script src="lib/terrain-generator/mersenne-twister.js"></script>
<script src="lib/terrain-generator/blur.js"></script>
<script src="lib/terrain-generator/destructure.js"></script>
<script src="lib/terrain-generator/mountains.js"></script>
<script src="lib/terrain-generator/perlinnoise.js"></script>
<script src="lib/terrain-generator/terraingen.js"></script>
<script src="lib/terrain-generator/circle.js"></script>
<script src="lib/water-material.js"></script>
<script src="lib/utils.js"></script>
<script src="build/js/main.js"></script>
<script src="build/js/director.js"></script>
<script src="build/js/sun.js"></script>
<script src="build/js/sky.js"></script>
<script src="build/js/fireflies.js"></script>
<script src="build/js/terrain.js"></script>
<script src="build/js/camera.js"></script>
<script src = 'build/js/world.js'></script>
<script id="fragmentShader" type="x-shader/x-fragment">
uniform float time;
uniform vec2 resolution;
uniform float fogDensity;
uniform vec3 fogColor;
uniform sampler2D texture1;
uniform sampler2D texture2;
varying vec2 vUv;
void main( void ) {
vec2 position = -1.0 + 2.0 * vUv;
vec4 noise = texture2D( texture1, vUv );
vec2 T1 = vUv + vec2( 1.5, -1.5 ) * time *0.02;
vec2 T2 = vUv + vec2( -0.5, 2.0 ) * time * 0.01;
T1.x += noise.x * 2.0;
T1.y += noise.y * 2.0;
T2.x -= noise.y * 0.2;
T2.y += noise.z * 0.2;
float p = texture2D( texture1, T1 * 2.0 ).a;
vec4 color = texture2D( texture2, T2 * 2.0 );
vec4 temp = color * ( vec4( p, p, p, p ) * 2.0 ) + ( color * color - 0.1 );
if( temp.r > 1.0 ){ temp.bg += clamp( temp.r - 2.0, 0.0, 100.0 ); }
if( temp.g > 1.0 ){ temp.rb += temp.g - 1.0; }
if( temp.b > 1.0 ){ temp.rg += temp.b - 1.0; }
gl_FragColor = temp;
}
</script>
<script id="vertexShader" type="x-shader/x-vertex">
uniform vec2 uvScale;
varying vec2 vUv;
void main()
{
vUv = uvScale * uv;
vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );
gl_Position = projectionMatrix * mvPosition;
}
</script>
</body>
</html>