-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
378 lines (309 loc) · 17.2 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>bkcastro</title>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="apple-touch-icon" href="assets/apple-touch-icon.png">
<style>
@font-face {
font-family: "CustomFont2";
src: url("./fonts/Mostwasted.ttf") format("truetype");
}
@font-face {
font-family: "CustomFont3";
src: url("./fonts/throwupz.ttf") format("truetype");
}
@font-face {
font-family: "CustomFont4";
src: url("./fonts/GraffitiFont.ttf") format("truetype");
}
h1 {
z-index: 2;
}
body {
text-align: center;
background-color: rgb(255, 255, 255);
margin: auto auto;
width: fit-content;
font-family: Arial, Helvetica, sans-serif;
}
canvas {
position: absolute;
top: 0;
right: 0;
width: 100%;
z-index: -1;
height: 100%
}
h1:hover {
color: red;
transform: scale(1.1);
}
.email {
padding: 5px 5px;
width: min-content;
margin: 10px auto;
background-color: red;
}
.email:hover {
text-decoration: underline;
}
.icon:hover {
background-color: black;
cursor: pointer;
}
.cell {
flex: 1 1 200px;
height: fit-content;
min-width: 200px;
max-width: 300px;
padding-left: 20px;
padding-right: 20px;
border-radius: 8px;
text-align: left;
background-color: #000000a4;
color: rgb(255, 255, 255);
z-index: 0;
}
/* Adjust layout for smaller screens */
@media (max-width: 768px) {
.cell {
flex: 1 1 100%; /* Full-width cells on smaller screens */
}
}
a {
color: rgb(255, 255, 255);
}
a:hover {
color: red;
}
ul {
z-index: 1;
}
</style>
</head>
<body>
<h1 style="padding-top: 100px; margin: 0 0; font-family: CustomFont4; font-size: 20px;">bkcastro</h1>
<h1 style="margin: 0 0; padding: 0 0; font-family: CustomFont3; font-size: 50px">lilgremlin</h1>
<h1 style="margin: 0 0; padding: 0 0; font-family: CustomFont2;">Erick Castro</h1>
<p class="email" onclick="copyText()">c1brandon626@gmail.com</p>
<div style="display: flex; align-items: center; justify-content: center; gap:20px;">
<a class='icon' href="https://www.instagram.com/bkcastro_/" target="_blank">
<svg width="30px" height="30px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 18C15.3137 18 18 15.3137 18 12C18 8.68629 15.3137 6 12 6C8.68629 6 6 8.68629 6 12C6 15.3137 8.68629 18 12 18ZM12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16Z" fill="#000000"/>
<path d="M18 5C17.4477 5 17 5.44772 17 6C17 6.55228 17.4477 7 18 7C18.5523 7 19 6.55228 19 6C19 5.44772 18.5523 5 18 5Z" fill="#ff0000"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.65396 4.27606C1 5.55953 1 7.23969 1 10.6V13.4C1 16.7603 1 18.4405 1.65396 19.7239C2.2292 20.8529 3.14708 21.7708 4.27606 22.346C5.55953 23 7.23969 23 10.6 23H13.4C16.7603 23 18.4405 23 19.7239 22.346C20.8529 21.7708 21.7708 20.8529 22.346 19.7239C23 18.4405 23 16.7603 23 13.4V10.6C23 7.23969 23 5.55953 22.346 4.27606C21.7708 3.14708 20.8529 2.2292 19.7239 1.65396C18.4405 1 16.7603 1 13.4 1H10.6C7.23969 1 5.55953 1 4.27606 1.65396C3.14708 2.2292 2.2292 3.14708 1.65396 4.27606ZM13.4 3H10.6C8.88684 3 7.72225 3.00156 6.82208 3.0751C5.94524 3.14674 5.49684 3.27659 5.18404 3.43597C4.43139 3.81947 3.81947 4.43139 3.43597 5.18404C3.27659 5.49684 3.14674 5.94524 3.0751 6.82208C3.00156 7.72225 3 8.88684 3 10.6V13.4C3 15.1132 3.00156 16.2777 3.0751 17.1779C3.14674 18.0548 3.27659 18.5032 3.43597 18.816C3.81947 19.5686 4.43139 20.1805 5.18404 20.564C5.49684 20.7234 5.94524 20.8533 6.82208 20.9249C7.72225 20.9984 8.88684 21 10.6 21H13.4C15.1132 21 16.2777 20.9984 17.1779 20.9249C18.0548 20.8533 18.5032 20.7234 18.816 20.564C19.5686 20.1805 20.1805 19.5686 20.564 18.816C20.7234 18.5032 20.8533 18.0548 20.9249 17.1779C20.9984 16.2777 21 15.1132 21 13.4V10.6C21 8.88684 20.9984 7.72225 20.9249 6.82208C20.8533 5.94524 20.7234 5.49684 20.564 5.18404C20.1805 4.43139 19.5686 3.81947 18.816 3.43597C18.5032 3.27659 18.0548 3.14674 17.1779 3.0751C16.2777 3.00156 15.1132 3 13.4 3Z" fill="#000000"/>
</svg>
</a>
<a class="icon" href="https://x.com/lunch_number" target="_blank">
<svg fill="#000000" height="30px" width="30px" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 460.775 460.775" xml:space="preserve">
<path d="M285.08,230.397L456.218,59.27c6.076-6.077,6.076-15.911,0-21.986L423.511,4.565c-2.913-2.911-6.866-4.55-10.992-4.55
c-4.127,0-8.08,1.639-10.993,4.55l-171.138,171.14L59.25,4.565c-2.913-2.911-6.866-4.55-10.993-4.55
c-4.126,0-8.08,1.639-10.992,4.55L4.558,37.284c-6.077,6.075-6.077,15.909,0,21.986l171.138,171.128L4.575,401.505
c-6.074,6.077-6.074,15.911,0,21.986l32.709,32.719c2.911,2.911,6.865,4.55,10.992,4.55c4.127,0,8.08-1.639,10.994-4.55
l171.117-171.12l171.118,171.12c2.913,2.911,6.866,4.55,10.993,4.55c4.128,0,8.081-1.639,10.992-4.55l32.709-32.719
c6.074-6.075,6.074-15.909,0-21.986L285.08,230.397z"/>
</svg>
</a>
<a class='icon' href="https://www.linkedin.com/in/brandon-castro22/" target="_blank">
<svg width="30px" height="30px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.5 8C7.32843 8 8 7.32843 8 6.5C8 5.67157 7.32843 5 6.5 5C5.67157 5 5 5.67157 5 6.5C5 7.32843 5.67157 8 6.5 8Z" fill="#0F0F0F"/>
<path d="M5 10C5 9.44772 5.44772 9 6 9H7C7.55228 9 8 9.44771 8 10V18C8 18.5523 7.55228 19 7 19H6C5.44772 19 5 18.5523 5 18V10Z" fill="#0F0F0F"/>
<path d="M11 19H12C12.5523 19 13 18.5523 13 18V13.5C13 12 16 11 16 13V18.0004C16 18.5527 16.4477 19 17 19H18C18.5523 19 19 18.5523 19 18V12C19 10 17.5 9 15.5 9C13.5 9 13 10.5 13 10.5V10C13 9.44771 12.5523 9 12 9H11C10.4477 9 10 9.44772 10 10V18C10 18.5523 10.4477 19 11 19Z" fill="#0F0F0F"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M20 1C21.6569 1 23 2.34315 23 4V20C23 21.6569 21.6569 23 20 23H4C2.34315 23 1 21.6569 1 20V4C1 2.34315 2.34315 1 4 1H20ZM20 3C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H20Z" fill="#0F0F0F"/>
</svg>
</a>
<a class='icon' href="https://github.com/bkcastro" target="_blank">
<svg width="30px" height="30px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>github [#142]</title>
<desc>Created with Sketch.</desc>
<defs>
</defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Dribbble-Light-Preview" transform="translate(-140.000000, -7559.000000)" fill="#000000">
<g id="icons" transform="translate(56.000000, 160.000000)">
<path d="M94,7399 C99.523,7399 104,7403.59 104,7409.253 C104,7413.782 101.138,7417.624 97.167,7418.981 C96.66,7419.082 96.48,7418.762 96.48,7418.489 C96.48,7418.151 96.492,7417.047 96.492,7415.675 C96.492,7414.719 96.172,7414.095 95.813,7413.777 C98.04,7413.523 100.38,7412.656 100.38,7408.718 C100.38,7407.598 99.992,7406.684 99.35,7405.966 C99.454,7405.707 99.797,7404.664 99.252,7403.252 C99.252,7403.252 98.414,7402.977 96.505,7404.303 C95.706,7404.076 94.85,7403.962 94,7403.958 C93.15,7403.962 92.295,7404.076 91.497,7404.303 C89.586,7402.977 88.746,7403.252 88.746,7403.252 C88.203,7404.664 88.546,7405.707 88.649,7405.966 C88.01,7406.684 87.619,7407.598 87.619,7408.718 C87.619,7412.646 89.954,7413.526 92.175,7413.785 C91.889,7414.041 91.63,7414.493 91.54,7415.156 C90.97,7415.418 89.522,7415.871 88.63,7414.304 C88.63,7414.304 88.101,7413.319 87.097,7413.247 C87.097,7413.247 86.122,7413.234 87.029,7413.87 C87.029,7413.87 87.684,7414.185 88.139,7415.37 C88.139,7415.37 88.726,7417.2 91.508,7416.58 C91.513,7417.437 91.522,7418.245 91.522,7418.489 C91.522,7418.76 91.338,7419.077 90.839,7418.982 C86.865,7417.627 84,7413.783 84,7409.253 C84,7403.59 88.478,7399 94,7399" id="github-[#142]">
</path>
</g>
</g>
</g>
</svg>
</a>
</div>
<div style="margin-top: 50px; padding: 20px;">
<div id="projectsDiv" style="
width: 100%; /* Make container responsive */
display: flex;
flex-wrap: wrap; /* Enable wrapping for responsiveness */
gap: 15px;
color: rgba(0, 0, 0, 0.664);
justify-content: center;
box-sizing: border-box;">
<!-- Games Category -->
<div class="cell">
<h3>Games</h3>
<ul>
<li>dev logs <a href="https://x.com/lunch_number" target="_blank">@lunch_number</a></li>
<li>xrSpellCaster (coding...)</li>
<li><a href="https://chakra-me.vercel.app/" target="_blank">generative rasengan thing</a></li>
</ul>
</div>
<!-- Art Category -->
<div class="cell">
<h3>Art</h3>
<ul>
<li><a href="https://bkcastro.github.io/xrSketch2/" target="_blank">I drew this the other day and wanted to see it in 3D!</a></li>
<li><a href="https://xr-spells.vercel.app/" target="_blank">casting spells</a></li>
<li><a href="https://xr-rat.vercel.app/" target="_blank">rat in a cage</a></li>
<li><a href="https://xr-sketch.vercel.app/" target="_blank">I feel like this :)</a></li>
<li><a href="https://mandelbrot-three.vercel.app/" target="_blank">mandlebrot</a></li>
<li><a href="https://genuary7.vercel.app/" target="_blank">my first pentagram</a></li>
<li><a href="https://webxr6.vercel.app/" target="_blank">this right here is crazy</a></li>
<!-- Add more art projects here -->
</ul>
</div>
<!-- Photography Category -->
<div class="cell">
<h3>Photography</h3>
<ul>
<li> catch me with a camera here -> <a href='https://www.instagram.com/lilgremlin_x/' target="_blank">@liljgremin_x</a></li>
<li><a href="https://bkcastro.github.io/LASKC/" target="_blank"> LA in the eyes of a vampire </a></li>
<!-- Add more photography projects here -->
</ul>
</div>
<!-- Web Projects Category -->
<div class="cell">
<h3>Web Projects</h3>
<ul>
<li><a href="https://sylwester.tech/xrbv/" target="_blank">xrBrickView</a></li>
<li><a href="https://whatitis-media.vercel.app" target="_blank">WhatitisMedia</a></li>
<!-- Add more web projects here -->
</ul>
</div>
</div>
</div>
<script src=" https://cdn.jsdelivr.net/npm/fflate@0.8.2/umd/index.min.js "></script>
<!-- Three.js Library -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
<!-- FBX Loader -->
<script src="https://cdn.jsdelivr.net/gh/mrdoob/three.js@r128/examples/js/loaders/FBXLoader.js"></script>
<!-- OrbitControls -->
<script src="https://cdn.jsdelivr.net/gh/mrdoob/three.js@r128/examples/js/controls/OrbitControls.js"></script>
<div></div>
<script>
window.addEventListener('resize', () => {
const cells = document.querySelectorAll('.cell');
cells.forEach(cell => {
if (window.innerWidth < 768) {
cell.style.flex = '1 1 100%';
} else {
cell.style.flex = '1 1 200px';
}
});
});
function copyText() {
const text = document.getElementById("text-to-copy").innerText;
navigator.clipboard.writeText(text).then(() => {
alert("Text copied to clipboard!");
}).catch(err => {
console.error("Could not copy text: ", err);
});
}
class Pentagram extends THREE.Mesh {
constructor() {
const geometry = new THREE.PlaneGeometry(1.5, 1.5)
const material = new THREE.MeshBasicMaterial({
map: new THREE.TextureLoader().load(`./pentagrams/penta.png`), // `./pentagrams/penta${1+Math.floor(Math.random()*5)}.png`
transparent: true,
})
super(geometry, material)
}
}
const container = document.getElementById('contain')
const width = window.innerWidth
const height = window.innerHeight
// Initialize the Scene
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(75, width / height, 0.1, 500);
camera.position.set(0, 4, 1.2); // Adjust camera position
//camera.lookAt(new THREE.Vector3(0,0,0))
let ready = false
const finalPosition = new THREE.Vector3(0, 0.2, 1.2)
// Renderer
const renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true });
renderer.setSize(width, height);
renderer.setClearColor(0x000000, 0);
document.body.appendChild(renderer.domElement);
// Orbit Controls
// const controls = new THREE.OrbitControls(camera, renderer.domElement);
// controls.enableDamping = true; // Smooth the orbit motion
// controls.dampingFactor = 0.25;
// controls.screenSpacePanning = false;
const clock = new THREE.Clock();
// Lighting
const light = new THREE.DirectionalLight(0xffffff, 1);
light.position.set(5, 5, 5).normalize();
scene.add(light);
const ambientLight = new THREE.AmbientLight(0xffffff, .5);
scene.add(ambientLight)
const penta1 = new Pentagram()
penta1.scale.multiplyScalar(1)
penta1.rotation.x = -Math.PI / 2
penta1.position.y = -0.2
scene.add(penta1)
let mixer = null
const projectsDiv = document.getElementById('projectsDiv')
// Load FBX Model
const loader = new THREE.FBXLoader();
loader.load('kaikei_v2.fbx', (object) => {
object.scale.multiplyScalar(0.005) // Adjust model scale if needed
object.position.y = -0.2
object.position.z = 0
// Set up AnimationMixer to control animations
mixer = new THREE.AnimationMixer(object);
// Store animation actions for each clip
const animations = {};
object.animations.forEach((clip) => {
const action = mixer.clipAction(clip);
animations[clip.name] = action;
});
console.log(animations)
const clips = ['chris_cross_apple_sauce', 'chris_cross_apple_sauce', 'chris_cross_apple_sauce', 'pray_2', 'godareyoureal', 'on_my_knees']
animations['Main|Main|Main|'+clips[Math.floor(Math.random()*clips.length)]].play();
scene.add(object);
ready = true
}, undefined, (error) => {
console.error('An error happened during loading:', error);
});
clock.start()
// Animation Loop
function animate() {
requestAnimationFrame(animate);
const elapsedTime = clock.getElapsedTime();
const delta = clock.getDelta();
if (ready) {
//penta1.rotation.z = elapsedTime / 4;
camera.position.lerp(finalPosition, 0.05)
scene.rotation.y = elapsedTime / 5;
}
renderer.render(scene, camera);
if (mixer != null) {
mixer.update(delta)
}
// Update controls
// controls.update();
}
animate();
// Responsive resizing
window.addEventListener('resize', () => {
renderer.setSize(window.innerWidth, window.innerHeight);
camera.aspect = window.innerWidth / window.innerHeight;
//if (window.innerWidth > 400) projectsDiv.style.width = window.innerWidth
camera.updateProjectionMatrix();
});
</script>
</body>
</html>