undefined / index.html
aedhgeg's picture
Удали ссылки на commisions, везде надо этот commisions убрать, я услуги не продаю никакие.
e778f6a verified
Raw History Blame Contribute Delete
33.7 kB
<!DOCTYPE html>
<html lang="en" data-theme="cyberpunk" class="scroll-smooth">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="3D Artist & Digital Creator | Blender Expert | Cyberpunk Enthusiast">
<title>Chopa4ok | 3D Digital Artist</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r134/three.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script>
<link href="https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap" rel="stylesheet">
<style>
@keyframes terminalGlow {
0% {
text-shadow: 0 0 5px #00d1ff;
}
50% {
text-shadow: 0 0 20px #00d1ff;
}
100% {
text-shadow: 0 0 5px #00d1ff;
}
}
.neon-text {
animation: terminalGlow 3s infinite;
}
.glass-panel {
background: rgb(29 39 63 / 60%);
backdrop-filter: blur(10px);
border: 1px solid rgba(0, 209, 255, 0.2);
}
.glow-border {
box-shadow: 0 0 15px rgba(0, 209, 255, 0.3);
}
.fade-in {
animation: fadeIn 0.8s ease-in forwards;
opacity: 0;
}
@keyframes fadeIn {
to {
opacity: 1;
}
}
.terminal-cursor::after {
content: "▋";
animation: blink 1s infinite;
color: #00d1ff;
}
@keyframes blink {
0%, 100% {
opacity: 1;
}
50% {
opacity: 0;
}
}
</style>
</head>
<body class="bg-gradient-to-b from-[#06070a] to-[#0b0c10] min-h-screen text-[#00d1ff] font-['Space_Mono'] overflow-x-hidden">
<div id="loading-screen" class="fixed inset-0 bg-[#06070a] z-50 flex flex-col items-center justify-center">
<div class="text-2xl mb-4 terminal-cursor" id="loading-text">> Booting Chopa4ok Digital Realm...</div>
<div class="w-16 h-16 border-4 border-[#00d1ff] border-t-transparent rounded-full animate-spin"></div>
<div class="mt-4 text-sm opacity-70">System Core v3.1.4 | Quantum Render Engine
</div>
</div>
<div id="main-content" class="opacity-0">
<div id="vanta-bg" class="fixed inset-0 -z-10 opacity-80"></div>
<div class="fixed inset-0 bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-transparent via-black/70 to-black -z-10"></div>
<header class="container mx-auto px-6 py-12 fade-in" style="animation-delay: 0.3s">
<div class="absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-transparent via-[#00d1ff] to-transparent"></div>
<div class="flex flex-col md:flex-row justify-between items-center">
<div class="mb-6 md:mb-0 relative group">
<h1 class="text-5xl md:text-6xl font-bold neon-text hover:text-white transition-all duration-300 cursor-pointer" id="logo-trigger">Chopa4ok</h1>
<p class="text-lg mt-2 flex items-center">
<span class="terminal-cursor">3D Artist & Digital Creator</span>
<span class="ml-2 px-2 py-1 text-xs bg-[#00d1ff]/20 rounded-md animate-pulse">AVAILABLE FOR WORK</span>
</p>
<div class="absolute -bottom-2 left-0 h-1 bg-[#00d1ff] w-0 group-hover:w-full transition-all duration-500"></div>
</div>
<div class="glass-panel glow-border rounded-lg p-4 w-full md:w-auto hover:shadow-[0_0_20px_rgba(0,209,255,0.3)] transition-all duration-300">
<div class="flex items-center space-x-4">
<div class="relative">
<button id="play-btn" class="p-2 rounded-full bg-[#00d1ff] bg-opacity-20 hover:bg-opacity-30 transition group">
<i data-feather="play" class="text-[#00d1ff] group-hover:scale-110 transition-transform"></i>
<span class="absolute -bottom-1 left-0 right-0 h-0.5 bg-[#00d1ff] scale-x-0 group-hover:scale-x-100 origin-left transition-transform"></span>
</button>
</div>
<div class="flex-1">
<p class="text-sm flex items-center">
<span class="mr-2">Cyberpunk Mix 2077</span>
<span class="text-xs bg-[#00d1ff]/20 px-1 rounded">LIVE</span>
</p>
<div class="w-full bg-[#00d1ff] bg-opacity-20 h-1 rounded-full mt-1">
<div id="progress-bar" class="bg-[#00d1ff] h-full rounded-full w-0 relative">
<div class="absolute right-0 top-1/2 -translate-y-1/2 w-2 h-2 bg-white rounded-full opacity-0" id="progress-knob"></div>
</div>
</div>
</div>
<div class="flex space-x-2">
<button id="prev-btn" class="p-1.5 rounded-full bg-[#00d1ff] bg-opacity-10 hover:bg-opacity-20 transition">
<i data-feather="skip-back" class="text-[#00d1ff] w-4 h-4"></i>
</button>
<button id="next-btn" class="p-1.5 rounded-full bg-[#00d1ff] bg-opacity-10 hover:bg-opacity-20 transition">
<i data-feather="skip-forward" class="text-[#00d1ff] w-4 h-4"></i>
</button>
</div>
</div>
</div>
</div>
</header>
<div class="container mx-auto px-6 fade-in" style="animation-delay: 0.5s">
<div class="glass-panel glow-border rounded-lg p-4 inline-block mb-8">
<div class="flex items-center space-x-4">
<i data-feather="clock" class="text-[#00d1ff]"></i>
<span id="time" class="text-lg">00:00:00</span>
<i data-feather="cloud" class="text-[#00d1ff]"></i>
<span id="weather" class="text-lg">Загрузка погоды (Open-Meteo)...</span>
</div>
</div>
</div>
<main class="container mx-auto px-6">
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
<div class="glass-panel glow-border rounded-lg p-6 fade-in hover:shadow-[0_0_30px_rgba(0,209,255,0.2)] transition-all duration-300" style="animation-delay: 0.7s">
<div class="mb-4">
<div class="flex items-center">
<div class="flex items-center">
<div class="w-3 h-3 rounded-full bg-red-500 mr-2 animate-pulse"></div>
<div class="w-3 h-3 rounded-full bg-yellow-500 mr-2"></div>
<div class="w-3 h-3 rounded-full bg-green-500 mr-2"></div>
<span class="text-sm ml-2">terminal@chopa4ok:~$</span>
<div class="ml-2 px-2 py-0.5 bg-[#00d1ff]/10 rounded text-xs border border-[#00d1ff]/30">about_me.txt</div>
</div>
</div>
</div>
<div class="terminal-text">
<p class="text-green-400">> Chopa4ok.init()</p>
<p class="mb-1">
<span class="text-green-400">> system status: </span>
<span class="text-[#00d1ff] animate-pulse">online</span>
<span class="ml-2 text-xs text-white/50">(last update: just now)</span>
</p>
<p class="mb-1">
<span class="text-green-400">> location: </span>
<span class="text-white">Kazakhstan, Petropavlovsk</span>
</p>
<br>
<div class="glass-panel glow-border rounded-lg p-4 mb-4 hover:shadow-[0_0_15px_rgba(0,209,255,0.2)] transition-all duration-300 group">
<p class="text-green-400">> skills.init()</p>
<div class="skills-grid grid grid-cols-1 sm:grid-cols-2 gap-2 mt-2">
<div class="skill-item flex items-center px-3 py-2 bg-[#00d1ff]/5 rounded hover:bg-[#00d1ff]/10 transition-all">
<div class="w-3 h-3 rounded-full bg-[#00d1ff] mr-2 animate-pulse"></div>
Blender 3D Mastery
</div>
<div class="skill-item flex items-center px-3 py-2 bg-[#00d1ff]/5 rounded hover:bg-[#00d1ff]/10 transition-all">
<div class="w-3 h-3 rounded-full bg-[#00d1ff] mr-2"></div>
Substance Painter
</div>
<div class="skill-item flex items-center px-3 py-2 bg-[#00d1ff]/5 rounded hover:bg-[#00d1ff]/10 transition-all">
<div class="w-3 h-3 rounded-full bg-[#00d1ff] mr-2"></div>
Unreal Engine 5
</div>
<div class="skill-item flex items-center px-3 py-2 bg-[#00d1ff]/5 rounded hover:bg-[#00d1ff]/10 transition-all">
<div class="w-3 h-3 rounded-full bg-[#00d1ff] mr-2"></div>
Python Automation
</div>
<div class="skill-item flex items-center px-3 py-2 bg-[#00d1ff]/5 rounded hover:bg-[#00d1ff]/10 transition-all">
<div class="w-3 h-3 rounded-full bg-[#00d1ff] mr-2"></div>
3D Printing
</div>
<div class="skill-item flex items-center px-3 py-2 bg-[#00d1ff]/5 rounded hover:bg-[#00d1ff]/10 transition-all">
<div class="w-3 h-3 rounded-full bg-[#00d1ff] mr-2"></div>
Motion Graphics
</div>
</div>
<p class="text-green-400 mt-3">> skills.loaded(6/6) <span class="text-xs text-white/50">// Hover for details</span></p>
</div>
<br>
<p>// Digital artist with a cybernetic mindset</p>
<p>// Blending art and engineering through 3D design</p>
<p>// Reconstructing reality, one polygon at a time</p>
<div class="fade-in" style="animation-delay: 0.9s">
<h2 class="text-3xl font-bold mb-8 neon-text tracking-wider">DIGITAL CREATIONS</h2>
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
<a href="https://artstation.com/chopa4ok" target="_blank" class="group relative overflow-hidden rounded-xl glass-panel glow-border transition-all duration-500 hover:shadow-[0_0_30px_rgba(0,209,255,0.5)] hover:z-10">
<img src="http://static.photos/technology/640x360/1" alt="Cyber Robot 1" class="w-full h-64 object-cover transition-all duration-700 group-hover:scale-110">
<div class="absolute inset-0 bg-gradient-to-t from-black/80 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-500 flex flex-col justify-end p-6">
<h3 class="text-xl font-bold mb-1 transform translate-y-4 group-hover:translate-y-0 transition-transform duration-300">Neon Mech</h3>
<p class="text-sm text-[#00d1ff] opacity-0 group-hover:opacity-100 transition-all duration-500 delay-100">Blender + Substance Painter</p>
<p class="text-xs mt-2 text-white/70 opacity-0 group-hover:opacity-100 transition-all duration-500 delay-200">Click to view on ArtStation</p>
</div>
</a>
<a href="https://instagram.com/chopa4ok" target="_blank" class="group relative overflow-hidden rounded-xl glass-panel glow-border transition-all duration-500 hover:shadow-[0_0_30px_rgba(0,209,255,0.5)] hover:z-10">
<img src="http://static.photos/technology/640x360/2" alt="Cyber Robot 2" class="w-full h-64 object-cover transition-all duration-700 group-hover:scale-110">
<div class="absolute inset-0 bg-gradient-to-t from-black/80 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-500 flex flex-col justify-end p-6">
<h3 class="text-xl font-bold mb-1 transform translate-y-4 group-hover:translate-y-0 transition-transform duration-300">Cyber Samurai</h3>
<p class="text-sm text-[#00d1ff] opacity-0 group-hover:opacity-100 transition-all duration-500 delay-100">Blender + ZBrush</p>
<p class="text-xs mt-2 text-white/70 opacity-0 group-hover:opacity-100 transition-all duration-500 delay-200">Click to view on Instagram</p>
</div>
</a>
<a href="https://t.me/chopa4ok" target="_blank" class="group relative overflow-hidden rounded-xl glass-panel glow-border transition-all duration-500 hover:shadow-[0_0_30px_rgba(0,209,255,0.5)] hover:z-10">
<img src="http://static.photos/technology/640x360/3" alt="Cyber Robot 3" class="w-full h-64 object-cover transition-all duration-700 group-hover:scale-110">
<div class="absolute inset-0 bg-gradient-to-t from-black/80 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-500 flex flex-col justify-end p-6">
<h3 class="text-xl font-bold mb-1 transform translate-y-4 group-hover:translate-y-0 transition-transform duration-300">Cyber Core</h3>
<p class="text-sm text-[#00d1ff] opacity-0 group-hover:opacity-100 transition-all duration-500 delay-100">Blender + Substance</p>
<p class="text-xs mt-2 text-white/70 opacity-0 group-hover:opacity-100 transition-all duration-500 delay-200">Click to view in Telegram</p>
</div>
</a>
</div>
</div>
</div>
</main>
<footer class="container mx-auto px-6 py-12 mt-12 fade-in" style="animation-delay: 1.1s">
<div class="glass-panel glow-border rounded-lg p-6 hover:shadow-[0_0_30px_rgba(0,209,255,0.2)] transition-all duration-300">
<h2 class="text-2xl mb-4 neon-text group">
> contacts
<span class="inline-block h-0.5 bg-[#00d1ff] ml-2 w-0 group-hover:w-8 transition-all duration-300"></span>
</h2>
<div class="grid grid-cols-2 md:grid-cols-4 gap-4">
<a href="mailto:contact@chopa4ok.com" class="contact-btn">
<i data-feather="mail" class="mr-2"></i> Email
<span class="absolute bottom-0 left-0 h-0.5 bg-[#00d1ff] w-0 group-hover:w-full transition-all duration-300"></span>
</a>
<a href="https://t.me/chopa4ok" target="_blank" class="contact-btn">
<i data-feather="send" class="mr-2"></i> Telegram
</a>
<a href="mailto:contact@chopa4ok.com" class="contact-btn">
<i data-feather="mail" class="mr-2"></i> Email
</a>
<a href="https://t.me/chopa4ok" target="_blank" class="contact-btn">
<i data-feather="send" class="mr-2"></i> Telegram
</a>
<a href="https://t.me/chopa4ok" target="_blank" class="contact-btn">
<i data-feather="send" class="mr-2"></i>
Telegram
</a>
</div>
<p class="mt-6 text-sm opacity-70"> ♥ — by Chopa4ok</p>
</div>
</footer>
</div>
<div id="connection-notification" class="fixed bottom-4 left-4 bg-[#00d1ff] bg-opacity-30 text-white px-4 py-2 rounded-lg opacity-0 transition-all duration-300 shadow-lg border border-[#00d1ff]/50">
<div class="flex items-center">
<i data-feather="check-circle" class="mr-2 text-green-400"></i>
<span>> Connection established. Welcome back, admin.</span>
</div>
</div>
<div id="scroll-top" class="fixed bottom-6 right-6 bg-[#00d1ff]/20 hover:bg-[#00d1ff]/30 border border-[#00d1ff]/50 p-3 rounded-full cursor-pointer opacity-0 transition-all duration-300 shadow-lg">
<i data-feather="arrow-up" class="text-[#00d1ff]"></i>
</div>
<script type="module">
// Loading sequence with enhanced animations
async function sequentialTyping(elements, strings, speed, delay) {
for (let i = 0; i < elements.length; i++) {
await typeText(elements[i], strings[i], speed);
await new Promise(resolve => setTimeout(resolve, delay));
}
}
function typeText(element, text, speed) {
return new Promise(resolve => {
let currentChar = 0;
const typingInterval = setInterval(() => {
if (currentChar <= text.length) {
element.textContent = text.substring(0, currentChar) + '▋';
currentChar++;
} else {
element.textContent = text;
clearInterval(typingInterval);
resolve();
}
}, speed);
});
}
document.addEventListener('DOMContentLoaded', async () => {
// Initialize sequential typing animation
const elementsToType = [
document.getElementById('loading-text'),
document.createElement('div'),
document.createElement('div'),
document.createElement('div')
];
elementsToType[0].parentNode.insertBefore(elementsToType[1], elementsToType[0].nextSibling);
elementsToType[1].parentNode.insertBefore(elementsToType[2], elementsToType[1].nextSibling);
elementsToType[2].parentNode.insertBefore(elementsToType[3], elementsToType[2].nextSibling);
await sequentialTyping(elementsToType, [
"> Booting Chopa4ok Digital Realm...",
"> Initializing neural networks...",
"> Loading 3D asset database...",
"> Connecting to render farm..."
], 50, 300);
// Initialize loading screen
setTimeout(() => {
document.getElementById('loading-screen').innerHTML = `
<div class="text-2xl mb-4">> Connection established.</div>
`;
setTimeout(() => {
document.getElementById('loading-screen').style.opacity = '0';
setTimeout(() => {
document.getElementById('loading-screen').style.display = 'none';
// Show connection notification
const notification = document.getElementById('connection-notification');
notification.style.opacity = '1';
setTimeout(() => {
notification.style.opacity = '0';
}, 2000);
// Show main content with fade in
document.getElementById('main-content').style.opacity = '1';
// Initialize Vanta.js
VANTA.GLOBE({
el: "#vanta-bg",
mouseControls: true,
touchControls: true,
gyroControls: false,
minHeight: 200.00,
minWidth: 200.00,
scale: 1.00,
scaleMobile: 1.00,
color: 0x00d1ff,
backgroundColor: 0x06070a,
size: 0.8
});
// Feather icons
feather.replace();
// Time update
function updateTime() {
const now = new Date();
document.getElementById('time').textContent = now.toLocaleTimeString();
}
updateTime();
setInterval(updateTime, 1000);
// --------------------------------------------------------------------------------------
// --- БЛОК АКТУАЛЬНОЙ ПОГОДЫ (ИСПОЛЬЗУЕМ OPEN-METEO БЕЗ КЛЮЧА) ---
// --------------------------------------------------------------------------------------
// Координаты Петропавловска, Казахстан (54.87° с.ш., 69.15° в.д.)
const lat = 54.87;
const lon = 69.15;
// URL для запроса текущей погоды и ветра от Open-Meteo (API не требует ключа)
const openMeteoUrl = `https://api.open-meteo.com/v1/forecast?latitude=${lat}&longitude=${lon}&current_weather=true&hourly=temperature_2m,weather_code&timezone=auto&forecast_days=1`;
async function updateWeather() {
const weatherElement = document.getElementById('weather');
weatherElement.textContent = 'Загрузка погоды (Open-Meteo)...';
try {
let response = await fetch(openMeteoUrl);
let data = await response.json();
if (!response.ok || !data.current_weather) {
throw new Error(`Ошибка: Проблема с данными Open-Meteo.`);
}
const temp = Math.round(data.current_weather.temperature);
const windSpeed = data.current_weather.windspeed;
// Формируем вывод
const weatherText = `🌡️ ${temp}°C. Ветер: ${windSpeed} м/с.`;
weatherElement.textContent = weatherText;
console.log('Погода успешно обновлена через Open-Meteo.');
} catch (error) {
console.error('Ошибка Open-Meteo:', error.message);
weatherElement.textContent = `🚫 Ошибка погоды: ${error.message}`;
}
}
// Запускаем обновление погоды
updateWeather();
// --------------------------------------------------------------------------------------
// --- БЛОК АКТУАЛЬНОЙ ПОГОДЫ (КОНЕЦ) ---
// --------------------------------------------------------------------------------------
// Enhanced audio player with playlist
const playlist = [
{
title: "Cyberpunk 2077 OST",
url: "https://files.catbox.moe/yjx46w.weba"
},
{
title: "Synthwave Mix",
url: "https://files.catbox.moe/5p5l4d.mp3"
},
{
title: "Darksynth Selection",
url: "https://files.catbox.moe/3n0z2k.mp3"
}
];
let currentTrack = 0;
const audio = new Audio(playlist[currentTrack].url);
const playBtn = document.getElementById('play-btn');
audio.volume = 0.1;
let isPlaying = true;
audio.play();
// Mute button
const muteBtn = document.createElement('button');
muteBtn.className = 'p-2 rounded-full bg-[#00d1ff] bg-opacity-20 hover:bg-opacity-30 transition ml-2';
muteBtn.innerHTML = '<i data-feather="volume-2" class="text-[#00d1ff]"></i>';
muteBtn.addEventListener('click', () => {
audio.muted = !audio.muted;
muteBtn.innerHTML = audio.muted ?
'<i data-feather="volume-x" class="text-[#00d1ff]"></i>' :
'<i data-feather="volume-2" class="text-[#00d1ff]"></i>';
feather.replace();
});
document.querySelector('.flex-1').appendChild(muteBtn);
audio.addEventListener('timeupdate', () => {
const progress = (audio.currentTime / audio.duration) * 100;
document.getElementById('progress-bar').style.width = `${progress}%`;
document.getElementById('progress-knob').style.opacity = progress > 0 ? '1' : '0';
// Update track title
document.querySelector('.flex-1 p span').textContent = playlist[currentTrack].title;
});
document.getElementById('prev-btn').addEventListener('click', () => {
currentTrack = (currentTrack - 1 + playlist.length) % playlist.length;
audio.src = playlist[currentTrack].url;
if (isPlaying) audio.play();
});
document.getElementById('next-btn').addEventListener('click', () => {
currentTrack = (currentTrack + 1) % playlist.length;
audio.src = playlist[currentTrack].url;
if (isPlaying) audio.play();
});
audio.addEventListener('ended', () => {
isPlaying = false;
playBtn.innerHTML = '<i data-feather="play" class="text-[#00d1ff]"></i>';
feather.replace();
document.getElementById('progress-bar').style.width = '0%';
});
playBtn.addEventListener('click', () => {
isPlaying = !isPlaying;
if (isPlaying) {
audio.play();
playBtn.innerHTML = '<i data-feather="pause" class="text-[#00d1ff]"></i>';
} else {
audio.pause();
playBtn.innerHTML = '<i data-feather="play" class="text-[#00d1ff]"></i>';
}
feather.replace();
});
// Logo animation
document.getElementById('logo-trigger').addEventListener('click', () => {
const logo = document.getElementById('logo-trigger');
anime({
targets: logo,
scale: [1, 1.2, 1],
color: ['#00d1ff', '#ff00d1', '#00d1ff'],
duration: 1000,
easing: 'easeInOutSine'
});
// Create particle explosion effect
for (let i = 0; i < 20; i++) {
const particle = document.createElement('div');
particle.style.position = 'absolute';
particle.style.width = '4px';
particle.style.height = '4px';
particle.style.backgroundColor = ['#00d1ff', '#ff00d1', '#ffffff'][Math.floor(Math.random() * 3)];
particle.style.borderRadius = '50%';
particle.style.left = `${logo.getBoundingClientRect().left + logo.offsetWidth/2}px`;
particle.style.top = `${logo.getBoundingClientRect().top + logo.offsetHeight/2}px`;
document.body.appendChild(particle);
anime({
targets: particle,
translateX: () => anime.random(-50, 50),
translateY: () => anime.random(-50, 50),
opacity: [1, 0],
duration: 1000,
easing: 'easeOutExpo',
complete: () => particle.remove()
});
}
});
// Volume control
const volumeControl = document.createElement('input');
volumeControl.type = 'range';
volumeControl.min = '0';
volumeControl.max = '1';
volumeControl.step = '0.1';
volumeControl.value = '0.7';
volumeControl.className = 'ml-4 w-20 accent-[#00d1ff]';
volumeControl.addEventListener('input', (e) => {
audio.volume = e.target.value;
if (audio.muted && e.target.value > 0) {
audio.muted = false;
muteBtn.innerHTML = '<i data-feather="volume-2" class="text-[#00d1ff]"></i>';
feather.replace();
}
});
document.querySelector('.flex-1').appendChild(volumeControl);
// Scroll to top button
window.addEventListener('scroll', () => {
const scrollTop = document.getElementById('scroll-top');
if (window.pageYOffset > 300) {
scrollTop.style.opacity = '1';
scrollTop.style.transform = 'translateY(0)';
} else {
scrollTop.style.opacity = '0';
scrollTop.style.transform = 'translateY(20px)';
}
});
document.getElementById('scroll-top').addEventListener('click', () => {
window.scrollTo({
top: 0,
behavior: 'smooth'
});
});
// 3D tilt effect for glass panels
const glassPanels = document.querySelectorAll('.glass-panel');
glassPanels.forEach(panel => {
panel.addEventListener('mousemove', (e) => {
const x = e.clientX - panel.getBoundingClientRect().left;
const y = e.clientY - panel.getBoundingClientRect().top;
const centerX = panel.offsetWidth / 2;
const centerY = panel.offsetHeight / 2;
const angleY = (x - centerX) / 80; // Reduced sensitivity
const angleX = (centerY - y) / 80; // Reduced sensitivity
panel.style.transition = 'transform 0.2s ease-out'; // Added smooth transition
panel.style.transform = `perspective(1000px) rotateX(${angleX}deg) rotateY(${angleY}deg)`;
});
panel.addEventListener('mouseleave', () => {
panel.style.transition = 'transform 0.4s ease-out'; // Slower reset
panel.style.transform = 'perspective(1000px) rotateX(0) rotateY(0)';
});
});
// Intersection Observer with parallax effect
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.style.animation = `fadeIn 0.8s ease-in forwards`;
// Add parallax effect
if (entry.target.dataset.parallax) {
const speed = parseFloat(entry.target.dataset.parallax) || 0.1;
window.addEventListener('scroll', () => {
const scrollY = window.pageYOffset;
entry.target.style.transform = `translateY(${scrollY * speed}px)`;
});
}
}
});
}, { threshold: 0.1 });
document.querySelectorAll('.fade-in').forEach((el, i) => {
observer.observe(el);
el.style.animationDelay = `${0.3 + (i * 0.2)}s`;
});
}, 500);
}, 1500);
}, 2500);
});
</script>
</body>
</html>