This repository has been archived by the owner on Oct 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcode.html
214 lines (202 loc) · 8.68 KB
/
code.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Pep Rodeja Ferrer - FullStack Developer</title>
<meta name="description" content="Pep Rodeja Ferrer coding career">
<meta name="keywords" content="Pep,Pep Rodeja Ferrer,Engineer,FullStack,Javascript,Node.js,FrontEnd,BackEnd">
<meta name="author" content="Pep Rodeja Ferrer">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<meta property="og:url" content="https://pep.rodeja.me/code.html" />
<meta property="og:type" content="profile" />
<meta property="og:title" content="Pep Rodeja Ferrer - FullStack Developer" />
<meta property="og:description" content="Pep Rodeja Ferrer coding career" />
<meta property="og:image" content="http://pep.rodeja.me/img/pep_profile.jpg" />
<meta property="og:image:secure_url" content="https://pep.rodeja.me/img/pep_profile.jpg" />
<meta property="og:image:alt" content="Pep Rodeja at VisionHack Moscow" />
<meta property="og:profile:first_name" content="Pep" />
<meta property="og:profile:last_name" content="Rodeja Ferrer" />
<meta property="og:profile:username" content="peprodeja" />
<meta property="og:profile:gender" content="male" />
<link rel="stylesheet" type="text/css" href="./style.css">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-55943176-7"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-55943176-7');
</script>
</head>
<body class="code-body" itemscope vocab="http://schema.org/" typeof="Person">
<script src="./js/three.js"></script>
<script src="./js/OrbitControls.js"></script>
<script src="./js/LoaderSupport.js"></script>
<script src="./js/OBJLoader2.js"></script>
<script src="./js/CopyShader.js"></script>
<script src="./js/EffectComposer.js"></script>
<script src="./js/SSAARenderPass.js"></script>
<script src="./js/RenderPass.js"></script>
<script src="./js/MaskPass.js"></script>
<script src="./js/ShaderPass.js"></script>
<nav class="index-main-content">
<h1 class="index-title"><a property="url" href="/">Hi, I'm <span property="givenName">Pep</span></a></h1>
<a href="mailto:[email protected]" class="index-subtitle">(CONTACT ME)</a>
<a href="/aerospace.html" class="index-button index-aerospace-engineer" property="knowsAbout">
I'm an Aerospace Engineer
</a>
<a href="/code.html" class="index-button index-code code--selected" property="knowsAbout">
I code
</a>
<footer>
Made by <span property="name">Pep Rodeja Ferrer</span>
</footer>
</nav>
<article class="web-main">
<p>
My first line of code
</p>
<p>
2007
</p>
<p>
led me to
</p>
<p></p>
<p>
make a bunch of early webs and flash games
</p>
<p>
2007-2012
</p>
<p>
that made me
</p>
<p></p>
<p property="worksFor" typeof="Organization">
co-found <em property="name"><a href="https://interactivebcn.com/">InteractiveBCN</a></em>,<br/>
a <span property="description">web consultancy firm</span><br/>
where I worked with <span property="owns" typeof="Product"><span property="name">Kibus</span></span> and <span property="owns" typeof="Product"><span property="name">Fctoring</span></span>.
</p>
<p>
2014-2017
</p>
<p>
I used that experience to
</p>
<p></p>
<p property="worksFor" typeof="Organization">
work at <em><a property="url" href="https://unioncrate.com/"><span property="name">UnionCrate</span>, <span property="location" typeof="Place"><span property="address">US</span></span></a></em><br/>
as external Senior Front-End Developer
</p>
<p>
2018
</p>
<p>
and then,
</p>
<p></p>
<p property="worksFor" typeof="Organization">
work at <em><a property="url" href="https://open-cosmos.com/"><span property="name">Open Cosmos</span>, <span property="location" typeof="Place"><span property="address">UK</span></span></a></em><br/>
as Full-Stack Software Developer
</p>
<p>
2018-now
</p>
</article>
<canvas id="satellite"/>
<script>
var canvas = document.getElementById('satellite')
var scene = new THREE.Scene();
var camera = new THREE.PerspectiveCamera( 60, canvas.clientWidth / canvas.clientHeight, 0.1, 1000 );
camera.position.x = -2;
camera.position.y = 2;
camera.position.z = 0;
camera.lookAt( 0, 0, 0 );
var renderer = new THREE.WebGLRenderer({ canvas , antialias: true, alpha: true });
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( canvas.clientWidth, canvas.clientHeight, false );
renderer.shadowMap.enabled = true;
renderer.shadowMap.type = THREE.PCFSoftShadowMap;
var diffuseColor = new THREE.Color().setHSL( 0.5, 0, 0.5 );
var material = new THREE.MeshPhysicalMaterial( {
color: diffuseColor,
metalness: 0,
roughness: 1,
clearCoat: 0,
clearCoatRoughness: 0,
reflectivity: 0
} );
var shadowMaterial = new THREE.ShadowMaterial();
material.opacity = 1;
var planegeometry = new THREE.PlaneGeometry( 50, 50, 0, 0 );
var plane = new THREE.Mesh( planegeometry, shadowMaterial );
plane.castShadow = true;
plane.receiveShadow = true;
plane.position.y = - 0;
plane.rotation.x = - Math.PI / 2;
scene.add( plane );
var loader = new THREE.OBJLoader2();
var satellite
var satellitePivot
// function called on successful load
var callbackOnLoad = function ( event ) {
satellite = event.detail.loaderRootNode
satellite.traverse( function ( child ) {
if ( child instanceof THREE.Mesh ) {
child.material = material;
child.scale.set( 0.3, 0.3, 0.3 )
child.castShadow = true;
child.receiveShadow = true;
}
} );
satellite.position.z = 0;
satellitePivot = new THREE.Object3D();
satellitePivot.add( satellite );
scene.add( satellitePivot );
};
// load a resource from provided URL synchronously
loader.load( './3d/laptop.obj', callbackOnLoad, null, null, null, false );
var pointLight = new THREE.PointLight( 0xffffff, 1, 100 );
pointLight.position.set( -2, 3, 0.5);
pointLight.castShadow = true;
pointLight.shadow.camera.near = 0.1;
pointLight.shadow.mapSize.width = 2048; // You have there 4K no need to go over 2K
pointLight.shadow.mapSize.height = 2048;
scene.add( pointLight );
var light = new THREE.AmbientLight( 0xffffff ); // soft white light
scene.add( light );
// postprocessing
composer = new THREE.EffectComposer( renderer );
ssaaRenderPass = new THREE.SSAARenderPass( scene, camera );
ssaaRenderPass.unbiased = false;
ssaaRenderPass.sampleLevel = 2;
composer.addPass( ssaaRenderPass );
copyPass = new THREE.ShaderPass( THREE.CopyShader );
copyPass.renderToScreen = true;
composer.addPass( copyPass );
var lastTime
function animate(time) {
if (!lastTime) lastTime = time;
var deltaT = time - lastTime;
lastTime = time;
requestAnimationFrame( animate );
if (satellite) {
satellitePivot.rotation.y += 0.0002 * deltaT;
// satellite.rotation.y += 0.01;
}
composer.render();
}
animate();
window.addEventListener('resize', function () {
renderer.setSize(canvas.clientWidth, canvas.clientHeight, false);
camera.aspect = canvas.clientWidth / canvas.clientHeight;
camera.updateProjectionMatrix();
var pixelRatio = renderer.getPixelRatio();
var newWidth = Math.floor( canvas.clientWidth / pixelRatio ) || 1;
var newHeight = Math.floor( canvas.clientHeight / pixelRatio ) || 1;
composer.setSize( newWidth, newHeight );
}, false);
</script>
</body>
</html>