From 7b5f21061ab04fe63ab65e09bde5b7297785b001 Mon Sep 17 00:00:00 2001 From: vshnosngh Date: Thu, 5 Nov 2026 11:10:39 +0530 Subject: [PATCH] feat(hero): redesign frontpage hero with high-end typography, optical 3D crystal and glassmorphic telemetry --- src/components/sections/HeroSection.tsx | 274 ++++++++++++++++-------- 1 file changed, 180 insertions(+), 94 deletions(-) diff --git a/src/components/sections/HeroSection.tsx b/src/components/sections/HeroSection.tsx index 955edb8..6ad79eb 100644 --- a/src/components/sections/HeroSection.tsx +++ b/src/components/sections/HeroSection.tsx @@ -258,22 +258,21 @@ export function HeroSection({ // ------------------------------------------------------------- // 3. Pure Front Page Hero View (for homepage /): - // ONLY Animated Text, 3D WebGL Prism, Particles, Radiant Colors & Effects - // Zero tool names, zero tool selection, zero feature lists + // Ultra-refined Typography, Optical Crystal Prism & Ambient Particles // ------------------------------------------------------------- return ( -
+
{/* 1. MagicUI Ambient Floating Particles */} {/* 2. Interactive 3D WebGL Crystal Prism Canvas Rotating Behind the Text */}
-
+
@@ -282,98 +281,138 @@ export function HeroSection({
-
+
{/* 4. Center Hero Typography & Visual Atmosphere */} -
- {/* Glowing Pill Badge */} -
+
+ {/* Ambient Frosted Eyebrow Badge */} +
- - + + + + + {resolvedBadge} + + + + v4.2 PRO - {resolvedBadge}
- {/* Grand Headline with Character-Level MagicUI Animation */} -

- + {/* Grand Headline: Masterpiece Proportions, Zero Awkward Wraps */} +

+ Imagine. Transform. - - + + Create the Impossible.

- {/* Inspiring, Universal Subtitle (No features, no tool lists) */} -

+ {/* Inspiring, Refined Editorial Subtitle */} +

Turn ordinary moments into extraordinary visual art. Instant, effortless, and private photo magic right in your browser.

- {/* Elegant Action Buttons */} -
+ {/* Luxury CTA Action Buttons */} + - {/* Dynamic Elemental Platform Telemetry Strip (Making space useful & rich) */} -
-
-
1.4M+
-
Photos Transformed
+ {/* Floating Glass Telemetry & Capability Capsule */} +
+ {/* Metric 1 */} +
+
+ 1.4M+ +
+
+ Photos Transformed +
-
-
-
< 0.8s
-
Instant Inference
+ +
+ + {/* Metric 2 */} +
+
+ < 0.8s +
+
+ Instant Inference +
-
-
-
100%
-
Client-Side Privacy
+ +
+ + {/* Metric 3 */} +
+
+ 100% +
+
+ Client-Side Privacy +
-
-
-
4K Lossless
-
Studio Resolution
+ +
+ + {/* Metric 4 */} +
+
+ 4K UHD +
+
+ Studio Resolution +
- {/* Gentle Scroll Cue */} + {/* Subtle Luxury Scroll Cue */} - Scroll to Explore - + + Scroll to Explore + + @@ -393,82 +432,111 @@ function Hero3DCanvas({ className }: { className?: string }) { const container = containerRef.current; if (!container) return; - let width = container.clientWidth || 600; - let height = container.clientHeight || 600; + let width = container.clientWidth || 800; + let height = container.clientHeight || 800; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(45, width / height, 0.1, 100); - camera.position.z = 4.2; + camera.position.z = 4.8; let renderer: THREE.WebGLRenderer | null = null; try { - renderer = new THREE.WebGLRenderer({ alpha: true, antialias: false, powerPreference: 'high-performance' }); + renderer = new THREE.WebGLRenderer({ alpha: true, antialias: true, powerPreference: 'high-performance' }); renderer.setSize(width, height); - renderer.setPixelRatio(Math.min(window.devicePixelRatio || 1, 1.5)); + renderer.setPixelRatio(Math.min(window.devicePixelRatio || 1, 2)); container.appendChild(renderer.domElement); } catch (e) { return; } - // Geometry: Floating Octahedron Crystal Prism - const geometry = new THREE.OctahedronGeometry(1.65, 0); - const material = new THREE.MeshStandardMaterial({ - color: 0x2563eb, + // Master Group for smooth coordinated rotation + const masterGroup = new THREE.Group(); + scene.add(masterGroup); + + // 1. Central Optical Translucent Crystal (Icosahedron, non-obstructive) + const crystalGeo = new THREE.IcosahedronGeometry(1.25, 0); + const crystalMat = new THREE.MeshPhysicalMaterial({ + color: 0x3b82f6, emissive: 0x1d4ed8, - emissiveIntensity: 0.25, - roughness: 0.2, - metalness: 0.2, + emissiveIntensity: 0.1, + roughness: 0.15, + metalness: 0.1, + transmission: 0.9, transparent: true, - opacity: 0.8, + opacity: 0.11, + ior: 1.4, }); + const crystal = new THREE.Mesh(crystalGeo, crystalMat); + masterGroup.add(crystal); - const crystal = new THREE.Mesh(geometry, material); - scene.add(crystal); - - // Wireframe Cage - const wireGeo = new THREE.WireframeGeometry(geometry); + // Wireframe Fine Lines for the Crystal + const wireGeo = new THREE.WireframeGeometry(crystalGeo); const wireMat = new THREE.LineBasicMaterial({ - color: 0x93c5fd, + color: 0x60a5fa, transparent: true, - opacity: 0.35, + opacity: 0.22, }); const wireframe = new THREE.LineSegments(wireGeo, wireMat); crystal.add(wireframe); - // Subtle Particle Constellation - const particleCount = 35; + // 2. Dual Gyro Gimbal Orbital Rings (Sleek Apple/Quantum Aesthetic) + // Ring 1 (Cyan orbital ring) + const ring1Geo = new THREE.TorusGeometry(2.15, 0.007, 16, 120); + const ring1Mat = new THREE.MeshBasicMaterial({ + color: 0x38bdf8, + transparent: true, + opacity: 0.20, + }); + const ring1 = new THREE.Mesh(ring1Geo, ring1Mat); + ring1.rotation.x = Math.PI / 3.2; + masterGroup.add(ring1); + + // Ring 2 (Indigo tilted orbital ring) + const ring2Geo = new THREE.TorusGeometry(1.8, 0.007, 16, 100); + const ring2Mat = new THREE.MeshBasicMaterial({ + color: 0x818cf8, + transparent: true, + opacity: 0.16, + }); + const ring2 = new THREE.Mesh(ring2Geo, ring2Mat); + ring2.rotation.y = Math.PI / 4; + ring2.rotation.z = Math.PI / 6; + masterGroup.add(ring2); + + // 3. Subtle Constellation of Ambient Starlight Particles + const particleCount = 40; const particleGeo = new THREE.BufferGeometry(); const posArray = new Float32Array(particleCount * 3); for (let i = 0; i < particleCount * 3; i++) { - posArray[i] = (Math.random() - 0.5) * 6; + posArray[i] = (Math.random() - 0.5) * 7.5; } particleGeo.setAttribute('position', new THREE.BufferAttribute(posArray, 3)); const particleMat = new THREE.PointsMaterial({ - size: 0.04, - color: 0x60a5fa, + size: 0.03, + color: 0x93c5fa, transparent: true, - opacity: 0.5, + opacity: 0.35, }); const particles = new THREE.Points(particleGeo, particleMat); - scene.add(particles); + masterGroup.add(particles); - // Studio Lights - const ambientLight = new THREE.AmbientLight(0xffffff, 0.85); + // 4. Studio Lighting + const ambientLight = new THREE.AmbientLight(0xffffff, 1.2); scene.add(ambientLight); - const pointLight = new THREE.PointLight(0x06b6d4, 3, 10); - pointLight.position.set(3, 3, 3); - scene.add(pointLight); + const cyanLight = new THREE.PointLight(0x06b6d4, 2.2, 12); + cyanLight.position.set(3.5, 3, 3); + scene.add(cyanLight); - const pointLight2 = new THREE.PointLight(0x4f46e5, 2.5, 10); - pointLight2.position.set(-3, -2, 2); - scene.add(pointLight2); + const indigoLight = new THREE.PointLight(0x6366f1, 1.8, 12); + indigoLight.position.set(-3.5, -2, 2.5); + scene.add(indigoLight); let animId = 0; let clock = new THREE.Clock(); let isVisible = true; - // IntersectionObserver to pause loop when scrolled out of view! + // IntersectionObserver to pause loop when scrolled out of view (0% CPU/GPU offscreen) const observer = new IntersectionObserver( (entries) => { entries.forEach((entry) => { @@ -481,14 +549,24 @@ function Hero3DCanvas({ className }: { className?: string }) { const animate = () => { animId = requestAnimationFrame(animate); - if (!isVisible) return; // Zero GPU work when offscreen! + if (!isVisible) return; const elapsed = clock.getElapsedTime(); - crystal.rotation.x = elapsed * 0.18; - crystal.rotation.y = elapsed * 0.25; - particles.rotation.y = elapsed * 0.05; - particles.rotation.x = elapsed * 0.03; + // Fluid crystal rotation + crystal.rotation.x = elapsed * 0.12; + crystal.rotation.y = elapsed * 0.16; + + // Gimbal ring orbital movements + ring1.rotation.z = elapsed * 0.14; + ring1.rotation.x = Math.PI / 3.2 + Math.sin(elapsed * 0.25) * 0.08; + + ring2.rotation.y = -elapsed * 0.11; + ring2.rotation.z = Math.PI / 6 + Math.cos(elapsed * 0.2) * 0.1; + + // Particle constellation subtle drift + particles.rotation.y = elapsed * 0.03; + particles.rotation.x = elapsed * 0.02; if (renderer) renderer.render(scene, camera); }; @@ -513,8 +591,16 @@ function Hero3DCanvas({ className }: { className?: string }) { if (renderer && renderer.domElement && container.contains(renderer.domElement)) { container.removeChild(renderer.domElement); } - geometry.dispose(); - material.dispose(); + crystalGeo.dispose(); + crystalMat.dispose(); + wireGeo.dispose(); + wireMat.dispose(); + ring1Geo.dispose(); + ring1Mat.dispose(); + ring2Geo.dispose(); + ring2Mat.dispose(); + particleGeo.dispose(); + particleMat.dispose(); renderer?.dispose(); }; }, []);