forked from FantasyInteractive/fi-labs_webgl-sparkling-logo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·64 lines (50 loc) · 1.78 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
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Fi - Sparkling logo</title>
<link rel="stylesheet" href="css/style.css" type="text/css" >
</head>
<body>
<div id="container"></div>
<!-- Libraries -->
<script src="js/library/dat.gui.js"></script>
<script src="js/library/Modernizr.js"></script>
<script src="js/library/Three.js"></script>
<script src="js/library/Detector.js"></script>
<script src="js/library/Stats.js"></script>
<script src="js/library/Tween.js"></script>
<script src="js/library/Sparks.js"></script>
<script src="js/library/ShaderExtras.js"></script>
<script src="js/library/postprocessing/EffectComposer.js"></script>
<script src="js/library/postprocessing/RenderPass.js"></script>
<script src="js/library/postprocessing/ShaderPass.js"></script>
<script src="js/library/postprocessing/MaskPass.js"></script>
<script type="x-shader/x-vertex" id="vertexshader">
attribute float size;
attribute vec4 ca;
varying vec4 vColor;
void main() {
vColor = ca;
vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );
gl_PointSize = size * ( 150.0 / length( mvPosition.xyz ) );
gl_Position = projectionMatrix * mvPosition;
}
</script>
<script type="x-shader/x-fragment" id="fragmentshader">
uniform vec3 color;
uniform sampler2D texture;
varying vec4 vColor;
uniform float radius;
uniform vec2 delta;
varying vec2 texCoord;
void main() {
vec4 outColor = texture2D( texture, gl_PointCoord );
if ( outColor.a < 0.5 ) discard;
gl_FragColor = outColor * vec4( color * vColor.xyz, 1.0 );
}
</script>
<!-- Showtime! -->
<script src="js/main.js"></script>
</body>
</html>