more graphics and background 3d visuals
Browse files- egyptian-slots.html +95 -7
- index.html +133 -11
egyptian-slots.html
CHANGED
|
@@ -8,6 +8,7 @@
|
|
| 8 |
<script src="https://unpkg.com/feather-icons"></script>
|
| 9 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js"></script>
|
| 10 |
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.waves.min.js"></script>
|
|
|
|
| 11 |
<style>
|
| 12 |
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Poppins:wght@400;600&display=swap');
|
| 13 |
|
|
@@ -45,17 +46,90 @@
|
|
| 45 |
transform-style: preserve-3d;
|
| 46 |
transition: transform 0.3s ease;
|
| 47 |
}
|
| 48 |
-
|
| 49 |
.symbol-3d:hover {
|
| 50 |
transform: translateZ(20px) scale(1.1);
|
| 51 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
</style>
|
| 53 |
</head>
|
| 54 |
<body class="sand-bg">
|
|
|
|
| 55 |
<div id="vanta-bg" class="fixed inset-0 z-0"></div>
|
|
|
|
|
|
|
|
|
|
| 56 |
<div class="fixed inset-0 bg-black/70 z-0"></div>
|
| 57 |
|
| 58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
<div class="container mx-auto flex items-center justify-between">
|
| 60 |
<div class="flex items-center">
|
| 61 |
<div class="mr-3 p-2 bg-yellow-700 rounded-full neuro-effect">
|
|
@@ -178,7 +252,7 @@
|
|
| 178 |
</section>
|
| 179 |
</main>
|
| 180 |
<script>
|
| 181 |
-
// Initialize Vanta.js background
|
| 182 |
VANTA.WAVES({
|
| 183 |
el: "#vanta-bg",
|
| 184 |
mouseControls: true,
|
|
@@ -189,12 +263,26 @@
|
|
| 189 |
scale: 1.00,
|
| 190 |
scaleMobile: 1.00,
|
| 191 |
color: 0xd4af37,
|
| 192 |
-
shininess:
|
| 193 |
-
waveHeight:
|
| 194 |
-
waveSpeed: 1.
|
| 195 |
});
|
| 196 |
|
| 197 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 198 |
feather.replace();
|
| 199 |
|
| 200 |
// 3D Spin Animation
|
|
|
|
| 8 |
<script src="https://unpkg.com/feather-icons"></script>
|
| 9 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js"></script>
|
| 10 |
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.waves.min.js"></script>
|
| 11 |
+
<script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
|
| 12 |
<style>
|
| 13 |
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Poppins:wght@400;600&display=swap');
|
| 14 |
|
|
|
|
| 46 |
transform-style: preserve-3d;
|
| 47 |
transition: transform 0.3s ease;
|
| 48 |
}
|
|
|
|
| 49 |
.symbol-3d:hover {
|
| 50 |
transform: translateZ(20px) scale(1.1);
|
| 51 |
}
|
| 52 |
+
|
| 53 |
+
.egyptian-particles {
|
| 54 |
+
position: fixed;
|
| 55 |
+
top: 0;
|
| 56 |
+
left: 0;
|
| 57 |
+
width: 100%;
|
| 58 |
+
height: 100%;
|
| 59 |
+
pointer-events: none;
|
| 60 |
+
z-index: -5;
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
.hieroglyph {
|
| 64 |
+
position: absolute;
|
| 65 |
+
color: rgba(212, 175, 55, 0.1);
|
| 66 |
+
font-size: 20px;
|
| 67 |
+
animation: hieroglyph-float 15s linear infinite;
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
@keyframes hieroglyph-float {
|
| 71 |
+
from { transform: translateY(100vh) rotate(0deg); }
|
| 72 |
+
to { transform: translateY(-100px) rotate(360deg); }
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
.sand-storm {
|
| 76 |
+
position: fixed;
|
| 77 |
+
top: 0;
|
| 78 |
+
left: 0;
|
| 79 |
+
width: 100%;
|
| 80 |
+
height: 100%;
|
| 81 |
+
background: linear-gradient(90deg,
|
| 82 |
+
transparent 0%,
|
| 83 |
+
rgba(212, 175, 55, 0.02) 50%,
|
| 84 |
+
transparent 100%);
|
| 85 |
+
background-size: 200% 100%;
|
| 86 |
+
animation: sand-storm-move 8s ease-in-out infinite;
|
| 87 |
+
z-index: -4;
|
| 88 |
+
pointer-events: none;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
@keyframes sand-storm-move {
|
| 92 |
+
0% { background-position: -100% 0; }
|
| 93 |
+
50% { background-position: 100% 0; }
|
| 94 |
+
100% { background-position: -100% 0; }
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
.pyramid-grid {
|
| 98 |
+
position: fixed;
|
| 99 |
+
top: 0;
|
| 100 |
+
left: 0;
|
| 101 |
+
width: 100%;
|
| 102 |
+
height: 100%;
|
| 103 |
+
background-image:
|
| 104 |
+
linear-gradient(rgba(212, 175, 55, 0.05) 1px, transparent 1px),
|
| 105 |
+
linear-gradient(90deg, rgba(212, 175, 55, 0.05) 1px, transparent 1px);
|
| 106 |
+
background-size: 60px 60px;
|
| 107 |
+
animation: pyramid-grid-move 12s linear infinite;
|
| 108 |
+
z-index: -6;
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
@keyframes pyramid-grid-move {
|
| 112 |
+
0% { transform: translate(0, 0) rotate(0deg); }
|
| 113 |
+
100% { transform: translate(60px, 60px) rotate(360deg); }
|
| 114 |
+
}
|
| 115 |
</style>
|
| 116 |
</head>
|
| 117 |
<body class="sand-bg">
|
| 118 |
+
<!-- Enhanced Egyptian Background Layers -->
|
| 119 |
<div id="vanta-bg" class="fixed inset-0 z-0"></div>
|
| 120 |
+
<div class="pyramid-grid"></div>
|
| 121 |
+
<div class="sand-storm"></div>
|
| 122 |
+
<div class="egyptian-particles" id="egyptian-particles"></div>
|
| 123 |
<div class="fixed inset-0 bg-black/70 z-0"></div>
|
| 124 |
|
| 125 |
+
<!-- Additional Egyptian 3D Elements -->
|
| 126 |
+
<div class="fixed top-32 right-32 w-28 h-28 hidden lg:block" style="transform-style: preserve-3d; animation: float 15s ease-in-out infinite;">
|
| 127 |
+
<div class="w-full h-full border-2 border-yellow-600/20" style="transform: rotateX(45deg) rotateY(45deg) translateZ(30px); clip-path: polygon(50% 0%, 0% 100%, 100% 100%);"></div>
|
| 128 |
+
</div>
|
| 129 |
+
<div class="fixed bottom-32 left-32 w-36 h-36 hidden lg:block" style="transform-style: preserve-3d; animation: float 18s ease-in-out infinite; animation-delay: 3s;">
|
| 130 |
+
<div class="w-full h-full border-2 border-yellow-600/15 rounded-full" style="transform: rotateX(30deg) rotateY(60deg) translateZ(40px);"></div>
|
| 131 |
+
</div>
|
| 132 |
+
<header class="egyptian-gradient py-6 px-4 sm:px-6 lg:px-8 sticky top-0 z-50" style="transform: translateZ(50px);">
|
| 133 |
<div class="container mx-auto flex items-center justify-between">
|
| 134 |
<div class="flex items-center">
|
| 135 |
<div class="mr-3 p-2 bg-yellow-700 rounded-full neuro-effect">
|
|
|
|
| 252 |
</section>
|
| 253 |
</main>
|
| 254 |
<script>
|
| 255 |
+
// Initialize enhanced Vanta.js background
|
| 256 |
VANTA.WAVES({
|
| 257 |
el: "#vanta-bg",
|
| 258 |
mouseControls: true,
|
|
|
|
| 263 |
scale: 1.00,
|
| 264 |
scaleMobile: 1.00,
|
| 265 |
color: 0xd4af37,
|
| 266 |
+
shininess: 80.00,
|
| 267 |
+
waveHeight: 30.00,
|
| 268 |
+
waveSpeed: 1.50
|
| 269 |
});
|
| 270 |
|
| 271 |
+
// Create hieroglyph particles
|
| 272 |
+
const egyptianParticles = document.getElementById('egyptian-particles');
|
| 273 |
+
const hieroglyphs = ['𓂀', '𓃀', '𓄿', '���', '𓆎', '𓇳', '𓈖', '𓉐', '𓊖', '𓏏'];
|
| 274 |
+
|
| 275 |
+
for (let i = 0; i < 20; i++) {
|
| 276 |
+
const glyph = document.createElement('div');
|
| 277 |
+
glyph.className = 'hieroglyph';
|
| 278 |
+
glyph.textContent = hieroglyphs[Math.floor(Math.random() * hieroglyphs.length)];
|
| 279 |
+
glyph.style.left = Math.random() * 100 + '%';
|
| 280 |
+
glyph.style.animationDelay = Math.random() * 15 + 's';
|
| 281 |
+
glyph.style.fontSize = Math.random() * 20 + 15 + 'px';
|
| 282 |
+
glyph.style.opacity = Math.random() * 0.3 + 0.1;
|
| 283 |
+
egyptianParticles.appendChild(glyph);
|
| 284 |
+
}
|
| 285 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 286 |
feather.replace();
|
| 287 |
|
| 288 |
// 3D Spin Animation
|
index.html
CHANGED
|
@@ -12,6 +12,7 @@
|
|
| 12 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
|
| 13 |
<script src="https://cdn.jsdelivr.net/npm/neurojs@latest/dist/neuro.min.js"></script>
|
| 14 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.7.7/dat.gui.min.js"></script>
|
|
|
|
| 15 |
<style>
|
| 16 |
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Poppins:wght@400;600&display=swap');
|
| 17 |
|
|
@@ -113,20 +114,124 @@
|
|
| 113 |
transform-style: preserve-3d;
|
| 114 |
perspective: 1000px;
|
| 115 |
}
|
| 116 |
-
|
| 117 |
.particles div {
|
| 118 |
animation: particle-float 10s ease-in-out infinite;
|
| 119 |
animation-delay: calc(var(--i) * 0.2s);
|
| 120 |
transform-style: preserve-3d;
|
| 121 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
</style>
|
| 123 |
</head>
|
| 124 |
<body>
|
| 125 |
-
<!-- Enhanced 3D Background -->
|
| 126 |
<div id="vanta-bg" class="fixed inset-0 -z-10 opacity-30"></div>
|
|
|
|
| 127 |
<div class="vignette"></div>
|
| 128 |
<div class="fixed inset-0 -z-20 bg-black/50"></div>
|
| 129 |
<div class="particles fixed inset-0 -z-10"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 130 |
<!-- Floating Elements -->
|
| 131 |
<div class="fixed -top-20 -left-20 w-64 h-64 rounded-full bg-yellow-600/10 blur-xl"></div>
|
| 132 |
<div class="fixed -bottom-20 -right-20 w-96 h-96 rounded-full bg-yellow-600/5 blur-xl"></div>
|
|
@@ -425,25 +530,42 @@
|
|
| 425 |
size: 1.2,
|
| 426 |
magnification: 1.5
|
| 427 |
});
|
| 428 |
-
|
| 429 |
-
// Particle system for depth effect
|
| 430 |
const particles = [];
|
| 431 |
-
const particleCount =
|
| 432 |
const particleContainer = document.querySelector('.particles');
|
|
|
|
| 433 |
|
| 434 |
for (let i = 0; i < particleCount; i++) {
|
| 435 |
const particle = document.createElement('div');
|
| 436 |
-
|
| 437 |
-
|
| 438 |
-
particle.
|
|
|
|
|
|
|
|
|
|
| 439 |
particle.style.left = Math.random() * 100 + '%';
|
| 440 |
particle.style.top = Math.random() * 100 + '%';
|
| 441 |
-
particle.style.transform = `translateZ(${-Math.random() *
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 442 |
particleContainer.appendChild(particle);
|
| 443 |
particles.push(particle);
|
| 444 |
}
|
| 445 |
-
|
| 446 |
-
// Animate particles for parallax effect
|
| 447 |
document.addEventListener('mousemove', (e) => {
|
| 448 |
const x = e.clientX / window.innerWidth;
|
| 449 |
const y = e.clientY / window.innerHeight;
|
|
|
|
| 12 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
|
| 13 |
<script src="https://cdn.jsdelivr.net/npm/neurojs@latest/dist/neuro.min.js"></script>
|
| 14 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.7.7/dat.gui.min.js"></script>
|
| 15 |
+
<script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
|
| 16 |
<style>
|
| 17 |
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Poppins:wght@400;600&display=swap');
|
| 18 |
|
|
|
|
| 114 |
transform-style: preserve-3d;
|
| 115 |
perspective: 1000px;
|
| 116 |
}
|
|
|
|
| 117 |
.particles div {
|
| 118 |
animation: particle-float 10s ease-in-out infinite;
|
| 119 |
animation-delay: calc(var(--i) * 0.2s);
|
| 120 |
transform-style: preserve-3d;
|
| 121 |
}
|
| 122 |
+
|
| 123 |
+
.geometric-bg {
|
| 124 |
+
position: fixed;
|
| 125 |
+
top: 0;
|
| 126 |
+
left: 0;
|
| 127 |
+
width: 100%;
|
| 128 |
+
height: 100%;
|
| 129 |
+
pointer-events: none;
|
| 130 |
+
z-index: -5;
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
.geometric-shape {
|
| 134 |
+
position: absolute;
|
| 135 |
+
border: 1px solid rgba(245, 158, 11, 0.1);
|
| 136 |
+
animation: rotate 20s linear infinite;
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
.triangle {
|
| 140 |
+
width: 0;
|
| 141 |
+
height: 0;
|
| 142 |
+
border-left: 50px solid transparent;
|
| 143 |
+
border-right: 50px solid transparent;
|
| 144 |
+
border-bottom: 86px solid rgba(245, 158, 11, 0.05);
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
.hexagon {
|
| 148 |
+
width: 100px;
|
| 149 |
+
height: 55px;
|
| 150 |
+
background: rgba(245, 158, 11, 0.03);
|
| 151 |
+
position: relative;
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
.hexagon:before,
|
| 155 |
+
.hexagon:after {
|
| 156 |
+
content: "";
|
| 157 |
+
position: absolute;
|
| 158 |
+
width: 0;
|
| 159 |
+
border-left: 50px solid transparent;
|
| 160 |
+
border-right: 50px solid transparent;
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
.hexagon:before {
|
| 164 |
+
bottom: 100%;
|
| 165 |
+
border-bottom: 28px solid rgba(245, 158, 11, 0.03);
|
| 166 |
+
}
|
| 167 |
+
|
| 168 |
+
.hexagon:after {
|
| 169 |
+
top: 100%;
|
| 170 |
+
border-top: 28px solid rgba(245, 158, 11, 0.03);
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
@keyframes rotate {
|
| 174 |
+
from { transform: rotate(0deg) translateZ(0); }
|
| 175 |
+
to { transform: rotate(360deg) translateZ(100px); }
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
.holographic {
|
| 179 |
+
background: linear-gradient(45deg,
|
| 180 |
+
rgba(245, 158, 11, 0.1) 0%,
|
| 181 |
+
rgba(59, 130, 246, 0.1) 25%,
|
| 182 |
+
rgba(168, 85, 247, 0.1) 50%,
|
| 183 |
+
rgba(236, 72, 153, 0.1) 75%,
|
| 184 |
+
rgba(245, 158, 11, 0.1) 100%);
|
| 185 |
+
background-size: 200% 200%;
|
| 186 |
+
animation: holographic-shift 3s ease infinite;
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
@keyframes holographic-shift {
|
| 190 |
+
0% { background-position: 0% 50%; }
|
| 191 |
+
50% { background-position: 100% 50%; }
|
| 192 |
+
100% { background-position: 0% 50%; }
|
| 193 |
+
}
|
| 194 |
+
|
| 195 |
+
.cyber-grid {
|
| 196 |
+
position: fixed;
|
| 197 |
+
top: 0;
|
| 198 |
+
left: 0;
|
| 199 |
+
width: 100%;
|
| 200 |
+
height: 100%;
|
| 201 |
+
background-image:
|
| 202 |
+
linear-gradient(rgba(245, 158, 11, 0.03) 1px, transparent 1px),
|
| 203 |
+
linear-gradient(90deg, rgba(245, 158, 11, 0.03) 1px, transparent 1px);
|
| 204 |
+
background-size: 50px 50px;
|
| 205 |
+
animation: grid-move 10s linear infinite;
|
| 206 |
+
z-index: -6;
|
| 207 |
+
}
|
| 208 |
+
|
| 209 |
+
@keyframes grid-move {
|
| 210 |
+
0% { transform: translate(0, 0); }
|
| 211 |
+
100% { transform: translate(50px, 50px); }
|
| 212 |
+
}
|
| 213 |
</style>
|
| 214 |
</head>
|
| 215 |
<body>
|
| 216 |
+
<!-- Enhanced 3D Background Layers -->
|
| 217 |
<div id="vanta-bg" class="fixed inset-0 -z-10 opacity-30"></div>
|
| 218 |
+
<div class="cyber-grid"></div>
|
| 219 |
<div class="vignette"></div>
|
| 220 |
<div class="fixed inset-0 -z-20 bg-black/50"></div>
|
| 221 |
<div class="particles fixed inset-0 -z-10"></div>
|
| 222 |
+
<div class="geometric-bg" id="geometric-bg"></div>
|
| 223 |
+
<div class="holographic fixed inset-0 opacity-20 pointer-events-none"></div>
|
| 224 |
+
|
| 225 |
+
<!-- Additional 3D Floating Elements -->
|
| 226 |
+
<div class="fixed top-20 right-20 w-32 h-32 hidden lg:block" style="transform-style: preserve-3d; animation: float 8s ease-in-out infinite;">
|
| 227 |
+
<div class="geometric-shape triangle" style="transform: rotateX(45deg) rotateY(45deg) translateZ(50px);"></div>
|
| 228 |
+
</div>
|
| 229 |
+
<div class="fixed bottom-20 left-20 w-40 h-40 hidden lg:block" style="transform-style: preserve-3d; animation: float 10s ease-in-out infinite; animation-delay: 2s;">
|
| 230 |
+
<div class="geometric-shape hexagon" style="transform: rotateX(30deg) rotateY(60deg) translateZ(30px);"></div>
|
| 231 |
+
</div>
|
| 232 |
+
<div class="fixed top-1/2 left-1/3 w-24 h-24 hidden md:block" style="transform-style: preserve-3d; animation: float 12s ease-in-out infinite; animation-delay: 4s;">
|
| 233 |
+
<div class="w-full h-full border-2 border-yellow-600/10 rounded-lg" style="transform: rotateX(45deg) rotateY(45deg) rotateZ(45deg) translateZ(40px);"></div>
|
| 234 |
+
</div>
|
| 235 |
<!-- Floating Elements -->
|
| 236 |
<div class="fixed -top-20 -left-20 w-64 h-64 rounded-full bg-yellow-600/10 blur-xl"></div>
|
| 237 |
<div class="fixed -bottom-20 -right-20 w-96 h-96 rounded-full bg-yellow-600/5 blur-xl"></div>
|
|
|
|
| 530 |
size: 1.2,
|
| 531 |
magnification: 1.5
|
| 532 |
});
|
| 533 |
+
// Enhanced particle system with multiple types
|
|
|
|
| 534 |
const particles = [];
|
| 535 |
+
const particleCount = 100;
|
| 536 |
const particleContainer = document.querySelector('.particles');
|
| 537 |
+
const particleTypes = ['circle', 'square', 'triangle'];
|
| 538 |
|
| 539 |
for (let i = 0; i < particleCount; i++) {
|
| 540 |
const particle = document.createElement('div');
|
| 541 |
+
const particleType = particleTypes[Math.floor(Math.random() * particleTypes.length)];
|
| 542 |
+
|
| 543 |
+
particle.className = `absolute bg-yellow-400/10`;
|
| 544 |
+
const size = Math.random() * 15 + 3;
|
| 545 |
+
particle.style.width = size + 'px';
|
| 546 |
+
particle.style.height = size + 'px';
|
| 547 |
particle.style.left = Math.random() * 100 + '%';
|
| 548 |
particle.style.top = Math.random() * 100 + '%';
|
| 549 |
+
particle.style.transform = `translateZ(${-Math.random() * 1500}px)`;
|
| 550 |
+
particle.style.setProperty('--i', i);
|
| 551 |
+
|
| 552 |
+
if (particleType === 'circle') {
|
| 553 |
+
particle.style.borderRadius = '50%';
|
| 554 |
+
} else if (particleType === 'triangle') {
|
| 555 |
+
particle.style.width = '0';
|
| 556 |
+
particle.style.height = '0';
|
| 557 |
+
particle.style.borderLeft = `${size/2}px solid transparent`;
|
| 558 |
+
particle.style.borderRight = `${size/2}px solid transparent`;
|
| 559 |
+
particle.style.borderBottom = `${size}px solid rgba(245, 158, 11, 0.1)`;
|
| 560 |
+
particle.style.background = 'transparent';
|
| 561 |
+
} else {
|
| 562 |
+
particle.style.transform += ` rotate(${Math.random() * 45}deg)`;
|
| 563 |
+
}
|
| 564 |
+
|
| 565 |
particleContainer.appendChild(particle);
|
| 566 |
particles.push(particle);
|
| 567 |
}
|
| 568 |
+
// Animate particles for parallax effect
|
|
|
|
| 569 |
document.addEventListener('mousemove', (e) => {
|
| 570 |
const x = e.clientX / window.innerWidth;
|
| 571 |
const y = e.clientY / window.innerHeight;
|