-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
149 lines (119 loc) · 3.8 KB
/
index.html
File metadata and controls
149 lines (119 loc) · 3.8 KB
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
<!DOCTYPE html>
<html>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" type="text/css" href="assets/fonts/Playfair/stylesheet.css"/>
<link rel="stylesheet" type="text/css" href="assets/fonts/Calibre/stylesheet.css"/>
<link rel="stylesheet" type="text/css" href="css/style.css"/>
<link rel="shortcut icon" type="image/png" href="assets/images/favicon.png"/>
<head>
<title>3 Sardines</title>
</head>
<body>
<div id="loadingLine"></div>
<div class="bar top"></div>
<div class="bar bottom"></div>
<div class="container" style="padding-bottom: 40vh;">
<div id="nav">
<div id="name">
<img src="assets/images/wong-chinese.png"/>
<span>BRYAN WONG</span>
</div>
<div class="links">
<div class="link">
<a href="work.html">WORK</a>
</div>
<!-- <div class="link">
<a>ABOUT</a>
</div> -->
</div>
</div>
<div class="wrapper main ">
<div id="container">
<div id="instructions">
<span>CLICK AND HOLD</span>
</div>
</div>
<div class="line"></div>
<div class="arrow">
<img src="assets/images/arrow.png"/>
</div>
</div>
<div class="about">
<header>ABOUT ME</header>
<p>My name's Bryan and I'm a software engineer who like design. I'm currently a front end engineering intern @ Facebook working on design tools.
Things I know: Javascript, C++, Python, React, Redux, WebGL, Node, SQL.</br>
<br></br>
bryanw0ng@g.ucla.edu</br>
</p>
<div class="links">
<a href="work.html">WORK</a>
<a target="_blank" href="https://www.behance.net/bryanw0ng5b23">BEHANCE</a>
<a target="_blank" href="https://github.com/wongbryan">GITHUB</a>
<a target="_blank" href="https://drive.google.com/file/d/1sD0rVOoo1S5jKFO8AaMd7XmTkNX1UiBW/view">RESUME</a>
</div>
</div>
</div>
</div>
</body>
<script type="vsh" id="vertexShader">
varying vec2 vUv;
void main() {
vUv = uv;
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
}
</script>
<script type="fsh" id="fragmentShader">
uniform sampler2D texture;
uniform sampler2D noise;
uniform float magnitude;
uniform float time;
uniform float speed;
uniform vec2 scale;
uniform vec2 mouse;
uniform vec2 resolution;
varying vec2 vUv;
void main(){
vec2 st = gl_FragCoord.xy/resolution;
/*get displacement w perlin noise*/
vec4 map = texture2D(noise, vUv + time*speed*.01);
map -= 0.5;
/*add sin movement to displacement for slight wave effect*/
map.xy *= sin(vUv.y*100.+time*speed);
map.xy *= scale * .8 * magnitude;
/*distortion from mouse*/
float radius = .05;
float dist = length(st-mouse);
float inCircle = step(dist, radius);
float extraDistort = (radius-dist)*inCircle*.5;
map += extraDistort;
vec4 color = texture2D(texture, vec2(vUv.x - map.x, vUv.y - map.y));
gl_FragColor = color;
}
</script>
<script src="bower_components/three.js/build/three.min.js"></script>
<script src="bower_components/three.js/examples/js/controls/OrbitControls.js"></script>
<script src="js/data.js"></script>
<script src="js/render.js"></script>
<script src="js/ui.js"></script>
<script>
init();
THREE.DefaultLoadingManager.onLoad = function ( ) {
var line = document.getElementById('loadingLine');
var bars = document.getElementsByClassName('bar');
var top = bars[0], bottom = bars[1];
top.classList.add('openTop');
bottom.classList.add('openBottom');
setTimeout(function(){
line.style.display = "none";
}, 700);
};
THREE.DefaultLoadingManager.onProgress = function ( url, itemsLoaded, itemsTotal ) {
console.log( 'Loading file: ' + url + '.\nLoaded ' + itemsLoaded + ' of ' + itemsTotal + ' files.' );
var line = document.getElementById('loadingLine');
var sx = itemsLoaded/itemsTotal;
line.style.transform = "translate(-50%, -50%) scaleX(" + sx + ")";
};
initImage('sardines');
animate();
</script>
</html>