-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
398 lines (301 loc) · 12.5 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
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
<!DOCTYPE html>
<html>
<head>
<title>Portfolio</title>
<link rel="stylesheet" href="font-awesome-4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="https://code.jquery.com/ui/1.12.0/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
<script type='text/javascript' >
var THREE, $, TweenLite, Power3, TimelineMax ;
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/88/three.js"> </script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r79/three.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.19.0/TweenMax.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.20.3/TweenLite.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.20.3/TimelineMax.min.js"></script>
<link rel="stylesheet" type="text/css" href="home.css">
</head>
<body>
<!-- This pen isn't a fan of small view heights, check it out in fullpage view for optimal viewing -->
<div class="intro-container">
<div class="typewriter">
<h1><span style="color: orange ;font-size: 45px;">I'm Sagarpreet Chadha .</span></h1>
</div>
<h1>Delhi Technological<br> University </h1>
<div class="button shift-camera-button">
<div class="border">
<div class="left-plane"></div>
<div class="right-plane"></div>
</div>
<br>
<button type="button" class="btn btn-warning">TO RESUME</button>
</div>
</div>
<div class="sky-container">
<div style="padding-left: 97%;">
<a id="home_button" title="Back" style="color:red ;" href=""><strong>X</strong></a>
</div>
<div class="container teal borderYtoX">
<a class="button" id="education">EDUCATION</a>
<a class="button" id="achievement">ACHIEVEMENTS</a>
<a class="button" id="projects">PROJECTS</a>
<a class="button" id="contact">CONTACT</a>
</div>
<div class='wrap'>
<div class='content'>
<a href="https://twitter.com/Sagarpreet_07" ><i class="fa fa-twitter-square fa-3x" aria-hidden="true" style="color: whitesmoke ; background-color: aqua;"></i></a>
<a href="https://github.com/sagarpreet-chadha"><i class="fa fa-github-square fa-3x" aria-hidden="true" style="background-color: black;color: whitesmoke ;"></i></a>
<a href="https://www.facebook.com/sagarpreet.chadha"><i class="fa fa-facebook-square fa-3x" aria-hidden="true" style="color: whitesmoke ;background-color: #4267b2;"></i></a>
<br>
<br>
<strong style="color: black;">[email protected]</strong>
</div>
</div>
<div class='wrap1'>
<div class='content1'>
<p style="color: black ;">
<strong>Delhi Technological University India - 2015-present</strong><br>
Bachelor of Technology<br>
Course in Information Technology ( IT ) CGPA: 8.56<br><br><br>
<strong>Lancers Convent School , India</strong><br> Passed with 95.6 % in CBSE (year - 2015)<br>
</p>
</div>
</div>
<div class='wrap2'>
<div class='content2'>
<p style="color: black ;">
1.) <strong>Departmental Rank 3</strong> in College ( 2nd semester )<br>
2.) CodeChef May <strong>Cook-Off</strong> 2017 : <strong>Global Rank 180</strong> .<br>
3.) <strong>World Food Hackathon</strong>(organised by Government of India)Position in <strong>TOP 10</strong><br>
4.) HACK-IIITD Hackathon ( organised by IIIT-DELHI ) : <strong>Position : 15</strong><br>
5.) Position in Top 10 in HACK-DTU Hackathon ( organised in DTU , Delhi) .<br>
6.) Elected <strong>Class Representative</strong> in College , 2nd year .<br>
7.) Successfully completed Data structures and Algorithms , Android Development Course and Alchemy (Web Development using Ruby on Rails) course from Coding Ninjas , India .
<br>
</p>
</div>
</div>
<div class='wrap3'>
<div class='content3'>
<p style="color: black ;">
<strong>DCE Speaks Up (Android Application)</strong><br>
An Android app helping students to get latest important information / circulars related to college . Use of API to get dates of all Competitive Programming contests . Available on Google Play Store .
<br> <a href="https://play.google.com/store/apps/details?id=thuglife.dcespeaksup&hl=en">https://play.google.com/store/apps/details?id=thuglife.dcespeaksup&hl=en</a><br><br>
<strong>DTU MESS (Android Application)</strong><br>
An android app to get the menu of the day in various canteens across college . Available on Google Play Store with approximately 1000 downloads . <br><a href="https://play.google.com/store/apps/details?id=chadhasagarpreet.dtumess&hl=en">https://play.google.com/store/apps/details?id=chadhasagarpreet.dtumess&hl=en</a><br><br>
<strong>OTHER PROJECTS :</strong> <a href="https://github.com/sagarpreet-chadha">https://github.com/sagarpreet-chadha</a>
<br>
</p>
</div>
</div>
</div>
<script>
$("#home_button").click(
function () {
// alert("Hello!");
location.reload() ;
}
);
$('#contact').on('click', function(){
$('.wrap, a').toggleClass('active');
return false;
});
$('#education').on('click', function(){
$('.wrap1, a').toggleClass('active');
return false;
});
$('#achievement').on('click', function(){
$('.wrap2, a').toggleClass('active');
return false;
});
$('#projects').on('click', function(){
$('.wrap3, a').toggleClass('active');
return false;
});
</script>
<!-- Social -->
<script>
"use strict";
/* globals THREE, $, TweenLite, Power3, TimelineMax */
let camera, scene, renderer;
let plane;
let raycaster = new THREE.Raycaster();
let normalizedMouse = {
x: 0,
y: -180
};
// let lightBlue = {
// r: 34,
// g: 183,
// b: 236
// };
let darkBlue = {
r: 0,
g: 52,
b: 74
};
let baseColorRGB = darkBlue;
let baseColor = "rgb(" + baseColorRGB.r + "," + baseColorRGB.g + "," + baseColorRGB.b + ")";
let nearStars, farStars, farthestStars;
function init() {
scene = new THREE.Scene();
camera = new THREE.PerspectiveCamera( 75, window.innerWidth/window.innerHeight, 0.1, 1000 );
renderer = new THREE.WebGLRenderer();
// Scene initialization
camera.position.z = 50;
renderer.setClearColor( "#121212", 1.0);
renderer.setSize( window.innerWidth, window.innerHeight );
renderer.setPixelRatio( window.devicePixelRatio );
document.body.appendChild( renderer.domElement );
// Lights
let topLight = new THREE.DirectionalLight(0xffffff, 1);
topLight.position.set(0,1,1).normalize();
scene.add(topLight);
let bottomLight = new THREE.DirectionalLight(0xffffff, 0.4);
bottomLight.position.set(1,-1,1).normalize();
scene.add(bottomLight);
let skyLightRight = new THREE.DirectionalLight(0x666666, 0.2);
skyLightRight.position.set(-1,-1,0.2).normalize();
scene.add(skyLightRight);
let skyLightCenter = new THREE.DirectionalLight(0x666666, 0.2);
skyLightCenter.position.set(-0,-1,0.2).normalize();
scene.add(skyLightCenter);
let skyLightLeft = new THREE.DirectionalLight(0x666666, 0.2);
skyLightLeft.position.set(1,-1,0.2).normalize();
scene.add(skyLightLeft);
// Mesh creation
let geometry = new THREE.PlaneGeometry(400, 400, 70, 70);
let darkBlueMaterial = new THREE.MeshPhongMaterial( { color: 0xffffff, shading: THREE.FlatShading, side: THREE.DoubleSide, vertexColors: THREE.FaceColors} );
geometry.vertices.forEach(function(vertice) {
vertice.x += (Math.random() - 0.5) * 4;
vertice.y += (Math.random() - 0.5) * 4;
vertice.z += (Math.random() - 0.5) * 4;
vertice.dx = Math.random() - 0.5;
vertice.dy = Math.random() - 0.5;
vertice.randomDelay = Math.random() * 5;
});
for ( var i = 0; i < geometry.faces.length; i ++ ) {
geometry.faces[ i ].color.setStyle( baseColor );
geometry.faces[ i ].baseColor = baseColorRGB;
}
plane = new THREE.Mesh( geometry, darkBlueMaterial );
scene.add( plane );
// Create stars
farthestStars = createStars(1200, 420, "#0952BD");
farStars = createStars(1200, 370, "#A5BFF0");
nearStars = createStars(1200, 290,"#118CD6");
scene.add(farthestStars);
scene.add(farStars);
scene.add(nearStars);
farStars.rotation.x = 0.25;
nearStars.rotation.x = 0.25;
// Uncomment for testing second camera position
// camera.rotation.x = Math.PI / 2;
// camera.position.y = -0;
// camera.position.z = 20;
// plane.scale.x = 2;
}
function createStars(amount, yDistance, color = "0x000000") {
let opacity = Math.random();
let starGeometry = new THREE.Geometry();
let starMaterial = new THREE.PointsMaterial({color: color, opacity: opacity});
for (let i = 0; i < amount; i++) {
let vertex = new THREE.Vector3();
vertex.z = (Math.random() - 0.5) * 1500;
vertex.y = yDistance;
vertex.x = (Math.random() - 0.5) * 1500;
starGeometry.vertices.push(vertex);
}
return new THREE.Points(starGeometry, starMaterial);
}
let timer = 0;
function render() {
requestAnimationFrame( render );
timer += 0.01;
let vertices = plane.geometry.vertices;
for (let i = 0; i < vertices.length; i++) {
// Ease back to original vertice position while still maintaining sine wave
vertices[i].x -= (Math.sin(timer + vertices[i].randomDelay) / 40) * vertices[i].dx;
vertices[i].y += (Math.sin(timer + vertices[i].randomDelay) / 40) * vertices[i].dy;
// ((vertices[i].x - vertices[i].originalPosition.x) * 0.1) +
}
// Determine where ray is being projected from camera view
raycaster.setFromCamera(normalizedMouse, camera);
// Send objects being intersected into a variable
let intersects = raycaster.intersectObjects([plane]);
if (intersects.length > 0) {
let faceBaseColor = intersects[0].face.baseColor;
plane.geometry.faces.forEach(function(face) {
face.color.r *= 255;
face.color.g *= 255;
face.color.b *= 255;
face.color.r += (faceBaseColor.r - face.color.r) * 0.01;
face.color.g += (faceBaseColor.g - face.color.g) * 0.01;
face.color.b += (faceBaseColor.b - face.color.b) * 0.01;
let rInt = Math.floor(face.color.r);
let gInt = Math.floor(face.color.g);
let bInt = Math.floor(face.color.b);
let newBasecol = "rgb(" + rInt + "," + gInt + "," + bInt + ")";
face.color.setStyle(newBasecol);
});
plane.geometry.colorsNeedUpdate = true;
intersects[0].face.color.setStyle("#006ea0");
plane.geometry.colorsNeedUpdate = true;
}
plane.geometry.verticesNeedUpdate = true;
plane.geometry.elementsNeedUpdate = true;
farthestStars.rotation.y -= 0.00001;
farStars.rotation.y -= 0.00005;
nearStars.rotation.y -= 0.00011;
renderer.render(scene, camera);
}
init();
window.addEventListener("resize", function() {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize( window.innerWidth, window.innerHeight );
});
window.addEventListener("mousemove", function(event) {
// Normalize mouse coordinates
normalizedMouse.x = (event.clientX / window.innerWidth) * 2 - 1;
normalizedMouse.y = -(event.clientY / window.innerHeight) * 2 + 1;
});
let introContainer = $('.intro-container');
let skyContainer = $('.sky-container');
let xMark = $('.x-mark');
$('.shift-camera-button').click(function() {
let introTimeline = new TimelineMax();
introTimeline.add([
TweenLite.fromTo(introContainer, 0.5, {opacity: 1}, {opacity: 0, ease: Power3.easeIn}),
TweenLite.to(camera.rotation, 3, {x: Math.PI / 2, ease: Power3.easeInOut}),
TweenLite.to(camera.position, 2.5, {z: 20, ease: Power3.easeInOut}),
TweenLite.to(camera.position, 3, {y: 120, ease: Power3.easeInOut}),
TweenLite.to(plane.scale, 3, {x: 2, ease: Power3.easeInOut}),
]);
introTimeline.add([
TweenLite.to(xMark, 2, {opacity: 1, ease: Power3.easeInOut}),
TweenLite.to(skyContainer, 2, {opacity: 1, ease: Power3.easeInOut})
]);
});
$('.x-mark').click(function() {
let outroTimeline = new TimelineMax();
outroTimeline.add([
TweenLite.to(xMark, 0.5, {opacity: 0, ease: Power3.easeInOut}),
TweenLite.to(skyContainer, 0.5, {opacity: 0, ease: Power3.easeInOut}),
TweenLite.to(camera.rotation, 3, {x: 0, ease: Power3.easeInOut}),
TweenLite.to(camera.position, 3, {z: 50, ease: Power3.easeInOut}),
TweenLite.to(camera.position, 2.5, {y: 0, ease: Power3.easeInOut}),
TweenLite.to(plane.scale, 3, {x: 1, ease: Power3.easeInOut}),
]);
outroTimeline.add([
TweenLite.to(introContainer, 0.5, {opacity: 1, ease: Power3.easeIn}),
]);
});
render();
</script>
</body>
</html>