Spaces:
Build error
Build error
Upload components/Interactive3DSection.jsx with huggingface_hub
Browse files
components/Interactive3DSection.jsx
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { motion } from 'framer-motion';
|
| 2 |
+
import { useRef, useState } from 'react';
|
| 3 |
+
import { Brain, Layers, Zap, Globe, Shield, Code } from 'lucide-react';
|
| 4 |
+
|
| 5 |
+
export default function Interactive3DSection() {
|
| 6 |
+
const containerRef = useRef(null);
|
| 7 |
+
const [mousePosition, setMousePosition] = useState({ x: 0, y: 0 });
|
| 8 |
+
|
| 9 |
+
const handleMouseMove = (e) => {
|
| 10 |
+
const { clientX, clientY } = e;
|
| 11 |
+
const { innerWidth, innerHeight } = window;
|
| 12 |
+
|
| 13 |
+
const x = (clientX - innerWidth / 2) / 25;
|
| 14 |
+
const y = (clientY - innerHeight / 2) / 25;
|
| 15 |
+
|
| 16 |
+
setMousePosition({ x, y });
|
| 17 |
+
};
|
| 18 |
+
|
| 19 |
+
const features = [
|
| 20 |
+
{
|
| 21 |
+
icon: <Brain className="w-8 h-8 text-purple-400" />,
|
| 22 |
+
title: "Neural Processing",
|
| 23 |
+
description: "Advanced AI algorithms that learn from user behavior"
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
icon: <Layers className="w-8 h-8 text-blue-400" />,
|
| 27 |
+
title: "3D Depth",
|
| 28 |
+
description: "Immersive three-dimensional interface layers"
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
icon: <Zap className="w-8 h-8 text-cyan-400" />,
|
| 32 |
+
title: "Real-time",
|
| 33 |
+
description: "Instant response with zero latency"
|
| 34 |
+
},
|
| 35 |
+
{
|
| 36 |
+
icon: <Globe className="w-8 h-8 text-emerald-400" />,
|
| 37 |
+
title: "Global CDN",
|
| 38 |
+
description: "Content delivered from nearest edge location"
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
icon: <Shield className="w-8 h-8 text-rose-400" />,
|
| 42 |
+
title: "Secure",
|
| 43 |
+
description: "Enterprise-grade encryption and security"
|
| 44 |
+
},
|
| 45 |
+
{
|
| 46 |
+
icon: <Code className="w-8 h-8 text-amber-400" />,
|
| 47 |
+
title: "Developer API",
|
| 48 |
+
description: "Easy integration with your existing stack"
|
| 49 |
+
}
|
| 50 |
+
];
|
| 51 |
+
|
| 52 |
+
return (
|
| 53 |
+
<section className="py-24 bg-slate-900 relative overflow-hidden">
|
| 54 |
+
<div
|
| 55 |
+
className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"
|
| 56 |
+
ref={containerRef}
|
| 57 |
+
onMouseMove={handleMouseMove}
|
| 58 |
+
>
|
| 59 |
+
<div className="text-center mb-20">
|
| 60 |
+
<motion.h2
|
| 61 |
+
className="text-4xl md:text-5xl font-bold text-white mb-6"
|
| 62 |
+
initial={{ opacity: 0, y: 20 }}
|
| 63 |
+
whileInView={{ opacity: 1, y: 0 }}
|
| 64 |
+
viewport={{ once: true }}
|
| 65 |
+
>
|
| 66 |
+
<span className="text-transparent bg-clip-text bg-gradient-to-r from-blue-400 to-purple-400">AI-Powered</span> Features
|
| 67 |
+
</motion.h2>
|
| 68 |
+
<motion.p
|
| 69 |
+
className="text-xl text-slate-400 max-w-3xl mx-auto"
|
| 70 |
+
initial={{ opacity: 0, y: 20 }}
|
| 71 |
+
whileInView={{ opacity: 1, y: 0 }}
|
| 72 |
+
viewport={{ once: true }}
|
| 73 |
+
transition={{ delay: 0.2 }}
|
| 74 |
+
>
|
| 75 |
+
Move your mouse to experience our interactive 3D feature showcase
|
| 76 |
+
</motion.p>
|
| 77 |
+
</div>
|
| 78 |
+
|
| 79 |
+
<div className="relative h-[600px]">
|
| 80 |
+
{/* Background Elements */}
|
| 81 |
+
<div
|
| 82 |
+
className="absolute inset-0 rounded-full bg-gradient-to-r from-blue-600/10 to-purple-600/10 blur-[100px] transition-transform duration-100"
|
| 83 |
+
style={{
|
| 84 |
+
transform: `translate(${mousePosition.x * -1}px, ${mousePosition.y * -1}px)`
|
| 85 |
+
|
| 86 |
+
/>
|
| 87 |
+
|
| 88 |
+
<div
|
| 89 |
+
className="absolute inset-0 rounded-full bg-gradient-to-r from-cyan-600/10 to-emerald-600/10 blur-[80px] transition-transform duration-100"
|