Portfoliothreejs / about.html
simran40's picture
Upload 5 files
17e4170 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>About Me</title>
<style>
/* --- CSS STYLES --- */
body {
margin: 0;
background-color: #0d0d0d;
font-family: 'Segoe UI', sans-serif;
color: white;
overflow-x: hidden;
}
/* Navigation */
nav {
padding: 2rem 4rem;
display: flex;
justify-content: space-between;
align-items: center;
position: absolute;
width: 90%;
z-index: 10;
}
.logo { font-weight: bold; font-size: 1.5rem; letter-spacing: 2px; }
.nav-links a {
color: #aaa;
text-decoration: none;
margin-left: 20px;
transition: 0.3s;
}
.nav-links a:hover { color: #00f260; }
.active-link { color: white !important; border-bottom: 2px solid #00f260; }
/* Main Layout */
.container {
display: flex;
min-height: 100vh;
align-items: center;
}
/* Left Content Section */
.text-section {
width: 50%;
padding: 0 0 0 4rem;
margin-top: 80px; /* Offset for nav */
z-index: 2;
}
h1 {
font-size: 3.5rem;
margin: 0 0 20px 0;
line-height: 1.1;
}
.highlight { color: #00f260; }
p.bio {
font-size: 1.1rem;
color: #ccc;
line-height: 1.6;
max-width: 500px;
margin-bottom: 30px;
}
/* Skill Bars */
.skills-container {
max-width: 500px;
margin-bottom: 40px;
}
.skill-box { margin-bottom: 15px; }
.skill-title { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 0.9rem; font-weight: bold;}
.progress-bar-bg {
background: rgba(255, 255, 255, 0.1);
height: 8px;
border-radius: 4px;
overflow: hidden;
}
.progress-bar-fill {
height: 100%;
background: linear-gradient(90deg, #00f260, #0575e6);
width: 0%; /* JS will animate this */
border-radius: 4px;
transition: width 1.5s ease-in-out;
}
/* Button */
.btn {
padding: 12px 30px;
border: 1px solid #00f260;
color: #00f260;
text-decoration: none;
font-weight: bold;
transition: 0.3s;
display: inline-block;
}
.btn:hover {
background: #00f260;
color: #000;
box-shadow: 0 0 15px rgba(0, 242, 96, 0.4);
}
/* Right 3D Section */
.visual-section {
width: 50%;
height: 100vh;
position: relative;
}
#about-canvas {
width: 100%;
height: 100%;
display: block;
}
/* Mobile Responsive */
@media screen and (max-width: 768px) {
.container { flex-direction: column; }
.text-section { width: 100%; padding: 2rem; margin-top: 60px; }
.visual-section { width: 100%; height: 50vh; }
nav { padding: 1.5rem 2rem; width: 85%; }
h1 { font-size: 2.5rem; }
}
</style>
</head>
<body>
<nav>
<div class="logo">PORTFOLIO</div>
<div class="nav-links">
<a href="new 1.html">Home</a>
<a href="projects.html">Projects</a>
<a href="work.html">Work</a>
<a href="about.html" class="active-link">About</a>
</div>
</nav>
<div class="container">
<div class="text-section">
<h1>Beyond the <br><span class="highlight">Code.</span></h1>
<p class="bio">
I am a creative developer who bridges the gap between design and engineering. With a background in Computer Science and a passion for interactive 3D art, I build digital experiences that are not only functional but memorable.
<br><br>
When I'm not coding, I'm exploring new technologies, contributing to open source, or designing 3D assets.
</p>
<div class="skills-container">
<div class="skill-box">
<div class="skill-title"><span>JavaScript / React</span><span>90%</span></div>
<div class="progress-bar-bg">
<div class="progress-bar-fill" style="width: 90%"></div>
</div>
</div>
<div class="skill-box">
<div class="skill-title"><span>Python / Backend</span><span>85%</span></div>
<div class="progress-bar-bg">
<div class="progress-bar-fill" style="width: 85%"></div>
</div>
</div>
<div class="skill-box">
<div class="skill-title"><span>Three.js / WebGL</span><span>75%</span></div>
<div class="progress-bar-bg">
<div class="progress-bar-fill" style="width: 75%"></div>
</div>
</div>
<div class="skill-box">
<div class="skill-title"><span>UI / UX Design</span><span>80%</span></div>
<div class="progress-bar-bg">
<div class="progress-bar-fill" style="width: 80%"></div>
</div>
</div>
</div>
<a href="#" class="btn">Download Resume</a>
</div>
<div class="visual-section">
<canvas id="about-canvas"></canvas>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
<script>
// --- 3D SPHERE ANIMATION ---
const canvas = document.getElementById('about-canvas');
const container = document.querySelector('.visual-section');
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(75, container.clientWidth / container.clientHeight, 0.1, 1000);
const renderer = new THREE.WebGLRenderer({ canvas: canvas, alpha: true, antialias: true });
renderer.setSize(container.clientWidth, container.clientHeight);
renderer.setPixelRatio(window.devicePixelRatio);
// 1. Create the Main Sphere (Wireframe)
const geometry = new THREE.SphereGeometry(10, 32, 32);
const material = new THREE.MeshBasicMaterial({
color: 0xffffff,
wireframe: true,
transparent: true,
opacity: 0.1
});
const sphere = new THREE.Mesh(geometry, material);
scene.add(sphere);
// 2. Create an Inner "Core" Sphere (Solid & Glowing)
const coreGeo = new THREE.SphereGeometry(4, 32, 32);
const coreMat = new THREE.MeshBasicMaterial({
color: 0x00f260
});
const core = new THREE.Mesh(coreGeo, coreMat);
scene.add(core);
// 3. Add Floating Particles around it
const particlesGeometry = new THREE.BufferGeometry();
const particlesCount = 500;
const posArray = new Float32Array(particlesCount * 3);
for(let i = 0; i < particlesCount * 3; i++) {
// Randomly position particles in a larger sphere area
posArray[i] = (Math.random() - 0.5) * 35;
}
particlesGeometry.setAttribute('position', new THREE.BufferAttribute(posArray, 3));
const particlesMaterial = new THREE.PointsMaterial({
size: 0.05,
color: 0x00f260
});
const particlesMesh = new THREE.Points(particlesGeometry, particlesMaterial);
scene.add(particlesMesh);
camera.position.z = 22;
// Interaction
let mouseX = 0;
let mouseY = 0;
// Note: We listen to the window, but we map it relative to the visual section
document.addEventListener('mousemove', (event) => {
mouseX = (event.clientX / window.innerWidth) * 2 - 1;
mouseY = -(event.clientY / window.innerHeight) * 2 + 1;
});
// Animation Loop
function animate() {
requestAnimationFrame(animate);
// Rotate objects
sphere.rotation.y += 0.002;
particlesMesh.rotation.y -= 0.001;
// Interactive tilt
sphere.rotation.x += mouseY * 0.01;
sphere.rotation.y += mouseX * 0.01;
// Pulse effect for the core
const time = Date.now() * 0.001;
core.scale.setScalar(1 + Math.sin(time * 2) * 0.1);
renderer.render(scene, camera);
}
animate();
// Handle Resize
window.addEventListener('resize', () => {
const width = container.clientWidth;
const height = container.clientHeight;
renderer.setSize(width, height);
camera.aspect = width / height;
camera.updateProjectionMatrix();
});
// --- SKILL BAR ANIMATION TRIGGER ---
// Simple script to animate width from 0 to % on load
window.addEventListener('load', () => {
const bars = document.querySelectorAll('.progress-bar-fill');
bars.forEach(bar => {
// We toggle the width to trigger the CSS transition
const width = bar.style.width;
bar.style.width = '0';
setTimeout(() => {
bar.style.width = width;
}, 100);
});
});
</script>
</body>
</html>