-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
252 lines (220 loc) · 6.19 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
<!DOCTYPE html>
<html lang="en">
<head>
<title>ALGORITHM VISUALIZERS - SOVRAN.CA</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<meta name="theme-color" content="#000000" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="GENERATOR" content="Freeway Pro 6.1.2">
<meta name="description" content="Algorithm Visualizers by Brandon Sovran">
<meta name="keywords" content="Algorithm Visualizers, RedBlack Tree, Binary Tree, 3D Graph Space">
<!-- BOOTSTRAP -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<script>document.documentElement.className="js";var supportsCssVars=function(){var e,t=document.createElement("style");return t.innerHTML="root: { --tmp-var: bold; }",document.head.appendChild(t),e=!!(window.CSS&&window.CSS.supports&&window.CSS.supports("font-weight","var(--tmp-var)")),t.parentNode.removeChild(t),e};supportsCssVars()||alert("Please view this demo in a modern browser that supports CSS Variables.");</script>
<style>
/* GLOBAL STYLES */
body {
background: #34495e;
display: flex;
overflow-x:hidden;
justify-content: center;
}
body::-webkit-scrollbar-track
{
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
background-color: #F5F5F5;
}
body::-webkit-scrollbar
{
width: 6px;
background-color: #F5F5F5;
}
body::-webkit-scrollbar-thumb
{
background-color: #2c7bc9;
}
/* DEMO-SPECIFIC STYLES */
.typewriter h1 {
color: #fff;
font-family: monospace;
overflow: hidden; /* Ensures the content is not revealed until the animation */
border-right: .15em solid #337ab7; /* The typwriter cursor */
white-space: nowrap; /* Keeps the content on a single line */
margin: 0 auto; /* Gives that scrolling effect as the typing happens */
letter-spacing: .15em; /* Adjust as needed */
animation:
typing 3.5s steps(30, end),
blink-caret .5s step-end infinite;
}
/* The typing effect */
@keyframes typing {
from { width: 0 }
to { width: 100% }
}
/* The typewriter cursor effect */
@keyframes blink-caret {
from, to { border-color: transparent }
50% { border-color: #3098ff }
}
.title{
left:50%;
transform: translate(-50%, -50%);
position:relative;
display:inline-block;
top:40%;
font-size:120%;
}
.wrapper{
position:absolute;
top:0px;
left:0px;
width:100%;
height:100%;
}
.scene{
position:absolute;
top:0px;
left:0px;
width:100%;
height:100%;
}
.scene2{
position:absolute;
top:0px;
left:0px;
width:100%;
height:100%;
}
.links{
position:absolute;
width:100%;
height:100%;
top:120%;
display:inline-block;
text-align:center;
}
.links a{
padding-bottom:45px;
font-size:20px;
text-decoration:none;
font-size:20px;
text-decoration:none;
color: #fff;
font-family: monospace;
}
.links a:hover{
text-decoration:none;
color:#e8e8e8;
font-family: monospace;
}
.box{
position:relative;
display:inline-block;
top:40%;
left:-20px;
text-align:left;
opacity:0;
}
.glyphicon-menu-down{
position:absolute;
height:10px;
top:90%;
left: 50%;
margin-left: -50px;
font-size:40px;
color: #fff;
}
@media only screen and (max-width: 580px) {
.glyphicon-menu-down{
margin-left: -8px;
}
.box{
left:-5px;
}
.title{
width:90%;
left:50%;
transform: translate(-50%, -50%);
top:44%;
}
.typewriter h1 {
text-align:center;
white-space: normal;
}
}
</style>
</head>
<body>
<div class="wrapper">
<span id="graphWrapper">
<canvas class="scene scene--full" id="scene"></canvas>
<script type="x-shader/x-vertex" id="wrapVertexShader">
attribute float size;
attribute vec3 color;
varying vec3 vColor;
void main() {
vColor = color;
vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );
gl_PointSize = size * ( 350.0 / - mvPosition.z );
gl_Position = projectionMatrix * mvPosition;
}
</script>
<script type="x-shader/x-fragment" id="wrapFragmentShader">
varying vec3 vColor;
uniform sampler2D texture;
void main(){
vec4 textureColor = texture2D( texture, gl_PointCoord );
if ( textureColor.a < 0.3 ) discard;
vec4 color = vec4(vColor.xyz, 1.0) * textureColor;
gl_FragColor = color;
}
</script>
</span>
<div class="title">
<div class="typewriter">
<h1>ALGORITHM VISUALIZERS.</h1>
</div>
</div>
<span id="downButton" class="glyphicon glyphicon-menu-down" aria-hidden="true"></span>
</div>
<div class="links">
<canvas class="scene scene--full" id="scene2"></canvas>
<div class="box">
<a href="BinaryTree.html"><span class="glyphicon glyphicon-menu-right " aria-hidden="true"></span> BINARY TREE VISUALIZER</a>
<br>
<a href="RedBlackTree.html"><span class="glyphicon glyphicon-menu-right " aria-hidden="true"></span> REDBLACK TREE VISUALIZER</a>
<br>
<a href="./3D"><span class="glyphicon glyphicon-menu-right " aria-hidden="true"></span> 3D GRAPH SPACE</a>
<br>
<a href="#"><span class="glyphicon glyphicon-menu-right " aria-hidden="true"></span> COMING SOON...</a>
</div>
</div>
<script>
$(window).scroll(function(){
$(".wrapper").css("opacity", 1 - $(window).scrollTop() / 300);
});
$(window).scroll(function(){
$(".box").css("opacity", 0 + $(window).scrollTop() / 1050);
});
$(window).scroll(function(){
$("#scene2").css("opacity", 0 + $(window).scrollTop() / 1200);
});
</script>
<script>
$("#downButton").click(function() {
$('html,body').animate({
scrollTop: $(".links").offset().top},
'slow');
});
</script>
<script src="3D/src/three.js" type="module"></script>
<script src="3D/src/TweenMax.min.js" type="module"></script>
<script src="graph.js" type="module"></script>
<script src="3D/src/perlin.js"></script>
<script src="graph2.js" type="module"></script>
</body>
</html>