diff --git a/src/app/components/Home.jsx b/src/app/components/Home.jsx index 65b2127..9ccde9d 100644 --- a/src/app/components/Home.jsx +++ b/src/app/components/Home.jsx @@ -1,641 +1,3 @@ -// "use client"; -// import { Canvas } from "@react-three/fiber"; -// import { OrbitControls } from "@react-three/drei"; -// import { EffectComposer, Bloom } from "@react-three/postprocessing"; -// import * as THREE from "three"; - -// function AISphere() { -// return ( -// -// {/* AI Core Sphere */} -// -// - -// {/* Wireframe overlay */} -// -// -// -// -// -// ); -// } - -// export default function Hero3D() { -// return ( -//
-// -// -// - -// {/* The futuristic AI sphere */} -// - -// {/* Glow effects */} -// -// -// - -// -// -//
-// ); -// } -// import { Canvas } from "@react-three/fiber"; -// import { OrbitControls } from "@react-three/drei"; -// import { Sphere, Line } from "@react-three/drei"; -// import { useRef } from "react"; -// import { useFrame } from "@react-three/fiber"; -// import { EffectComposer, Bloom } from "@react-three/postprocessing"; -// import { motion } from "framer-motion"; -// import { ReactTyped } from "react-typed"; -// import Navbar from "./Navbar"; -// const Glow = ({ className = "" }) => ( -//
-// ); -// function AnimatedNeuralNode({ position, color, size = 0.08 }) { -// const ref = useRef(); - -// useFrame((state) => { -// if (ref.current) { -// // Subtle pulsing animation -// ref.current.scale.x = 1 + Math.sin(state.clock.elapsedTime * 2) * 0.1; -// ref.current.scale.y = 1 + Math.sin(state.clock.elapsedTime * 2) * 0.1; -// ref.current.scale.z = 1 + Math.sin(state.clock.elapsedTime * 2) * 0.1; -// } -// }); - -// return ( -// -// -// -// ); -// } - -// function NeuralStructure({ -// position = [0, 0, 0], -// color = "#00faff", -// nodeCount = 8, -// }) { -// const nodes = useRef([]); - -// if (nodes.current.length === 0) { -// for (let i = 0; i < nodeCount; i++) { -// nodes.current.push([ -// (Math.random() - 0.5) * 3, -// (Math.random() - 0.5) * 3, -// (Math.random() - 0.5) * 3, -// ]); -// } -// } - -// const connections = []; -// for (let i = 0; i < nodeCount; i++) { -// const connectionCount = 2 + Math.floor(Math.random() * 2); -// const connectedIndices = new Set(); - -// while (connectedIndices.size < connectionCount) { -// const targetIndex = Math.floor(Math.random() * nodeCount); -// if (targetIndex !== i) { -// connectedIndices.add(targetIndex); -// } -// } - -// connectedIndices.forEach((targetIndex) => { -// connections.push([i, targetIndex]); -// }); -// } - -// return ( -// -// {nodes.current.map((pos, i) => ( -// -// ))} - -// {connections.map(([start, end], i) => ( -// -// ))} -// -// ); -// } - -// export default function Home() { -// const structures = []; -// const colors = [ -// "#00faff", -// "#00d9ff", -// "#00bfff", -// "#1e90ff", -// "#007fff", -// "#4dffff", -// ]; - -// for (let i = 0; i < 12; i++) { -// structures.push({ -// position: [ -// (Math.random() - 0.5) * 15, -// (Math.random() - 0.5) * 15, -// (Math.random() - 0.5) * 15, -// ], -// color: colors[i % colors.length], -// nodeCount: 5 + Math.floor(Math.random() * 6), -// }); -// } - -// return ( -//
-// -//
-// -// -// -// MACHINE LEARNING FOR EVERYONE (ML4E) -// - -// -// -// -// -//
- -// -// -// -// - -// {structures.map((props, i) => ( -// -// ))} - -// 768} -// touches={{ -// ONE: null, -// TWO: null -// }} -// /> - -// {/* 🌟 Bloom Effect for neon glow */} -// -// -// -// -//
-// ); -// } -// import { Canvas } from "@react-three/fiber"; -// import { OrbitControls } from "@react-three/drei"; -// import { Sphere, Line } from "@react-three/drei"; -// import { useRef, useMemo } from "react"; -// import { useFrame } from "@react-three/fiber"; -// import { EffectComposer, Bloom } from "@react-three/postprocessing"; -// import { motion } from "framer-motion"; -// import Navbar from "./Navbar"; - -// const Glow = ({ className = "" }) => ( -//
-// ); - -// // Navbar placeholder - - -// function AnimatedNeuralNode({ position, color, size = 0.08, delay = 0 }) { -// const ref = useRef(); - -// useFrame((state) => { -// if (ref.current) { -// // Subtle pulsing animation with individual delay -// const time = state.clock.elapsedTime + delay; -// ref.current.scale.x = 1 + Math.sin(time * 2) * 0.15; -// ref.current.scale.y = 1 + Math.sin(time * 2) * 0.15; -// ref.current.scale.z = 1 + Math.sin(time * 2) * 0.15; -// } -// }); - -// return ( -// -// -// -// ); -// } -// // Add this component after the imports -// function ElectricCircuitBackground() { -// return ( -// -// {/* Main circuit grid */} -// - -// {/* Floating circuit lines */} -// {Array.from({ length: 20 }).map((_, i) => { -// const x = (Math.random() - 0.5) * 40; -// const y = (Math.random() - 0.5) * 40; -// const length = 3 + Math.random() * 5; - -// return ( -// -// ); -// })} - -// {/* Circuit nodes */} -// {Array.from({ length: 30 }).map((_, i) => ( -// -// -// -// ))} -// -// ); -// } -// function NeuralStructure({ -// position = [0, 0, 0], -// color = "#00faff", -// structureIndex = 0, -// }) { -// // Generate fixed node positions based on structure index -// const nodes = useMemo(() => { -// const nodePositions = []; -// const nodeCount = 12; -// const radius = 1.2; - -// // Create a spherical distribution of nodes -// for (let i = 0; i < nodeCount; i++) { -// const phi = Math.acos(-1 + (2 * i) / nodeCount); -// const theta = Math.sqrt(nodeCount * Math.PI) * phi + structureIndex; - -// nodePositions.push([ -// radius * Math.cos(theta) * Math.sin(phi), -// radius * Math.sin(theta) * Math.sin(phi), -// radius * Math.cos(phi), -// ]); -// } -// return nodePositions; -// }, [structureIndex]); - -// // Generate fixed connections -// const connections = useMemo(() => { -// const conns = []; -// const nodeCount = nodes.length; - -// for (let i = 0; i < nodeCount; i++) { -// // Connect to nearest neighbors -// const distances = nodes.map((node, j) => ({ -// index: j, -// distance: Math.hypot( -// node[0] - nodes[i][0], -// node[1] - nodes[i][1], -// node[2] - nodes[i][2] -// ), -// })); - -// distances.sort((a, b) => a.distance - b.distance); - -// // Connect to 3 nearest neighbors -// for (let j = 1; j <= 3 && j < distances.length; j++) { -// const targetIndex = distances[j].index; -// if (i < targetIndex) { // Avoid duplicate connections -// conns.push([i, targetIndex]); -// } -// } -// } -// return conns; -// }, [nodes]); - -// return ( -// -// {nodes.map((pos, i) => ( -// -// ))} - -// {connections.map(([start, end], i) => ( -// -// ))} -// -// ); -// } - -// export default function Home() { -// const colors = [ -// "#00faff", // Cyan -// "#00d9ff", // Light blue -// "#00bfff", // Sky blue -// "#1e90ff", // Dodger blue -// "#007fff", // Azure -// "#4dffff", // Electric cyan -// ]; - -// // Fixed positions covering entire viewport in 3D space -// const structures = useMemo(() => { -// const positions = [ -// // Top row - Front layer -// [-8, 5, 2], -// [-4, 6, 2], -// [0, 5.5, 2], -// [4, 6, 2], -// [8, 5, 2], - -// // Middle-top row -// [-7, 3, 0], -// [-3.5, 3.5, 0], -// [0, 3, 0], -// [3.5, 3.5, 0], -// [7, 3, 0], - -// // Center row -// [-8, 0, -1], -// [-4, 0, -1], -// [0, 0, -1], -// [4, 0, -1], -// [8, 0, -1], - -// // Middle-bottom row -// [-7, -3, 0], -// [-3.5, -3.5, 0], -// [0, -3, 0], -// [3.5, -3.5, 0], -// [7, -3, 0], - -// // Bottom row - Front layer -// [-8, -5, 2], -// [-4, -6, 2], -// [0, -5.5, 2], -// [4, -6, 2], -// [8, -5, 2], - -// // Back layer scattered -// [-6, 4, -4], -// [6, 4, -4], -// [-6, -4, -4], -// [6, -4, -4], -// [0, 5, -4], -// [0, -5, -4], - - -// ]; - -// return positions.map((position, i) => ({ -// position, -// color: colors[i % colors.length], -// structureIndex: i, -// })); -// }, []); -// function CyberGridBackground() { -// const gridRef = useRef(); - -// useFrame((state) => { -// if (gridRef.current) { -// // Subtle movement -// gridRef.current.position.x = Math.sin(state.clock.elapsedTime * 0.1) * 0.5; -// gridRef.current.position.y = Math.cos(state.clock.elapsedTime * 0.08) * 0.5; -// } -// }); - -// return ( -// -// {/* Main grid plane */} -// -// -// -// - -// {/* Vertical grid lines */} -// -// -// -// - -// {/* Glowing data points */} -// {Array.from({ length: 50 }).map((_, i) => ( -// -// -// -// -// ))} -// -// ); -// } - -// return ( -//
-// - -// {/* Content Section */} -//
-//
-// -// -// -// -// MACHINE LEARNING FOR EVERYONE -// - -// -// (ML4E) -// - -// -// THE OFFICIAL MACHINE LEARNING CLUB OF NIT ROURKELA -// -// -// -//
- -// {/* 3D Canvas */} -//
-// -// -// -// -// -// - -// {structures.map((props, i) => ( -// -// ))} - -// - -// -// -// -// -//
-//
-//
-// ); -// } import { Canvas } from "@react-three/fiber"; import { OrbitControls } from "@react-three/drei"; import { Sphere, Line } from "@react-three/drei"; @@ -644,6 +6,7 @@ import { useFrame } from "@react-three/fiber"; import { EffectComposer, Bloom } from "@react-three/postprocessing"; import { motion } from "framer-motion"; import Navbar from "./Navbar"; +import { ChevronRight } from "lucide-react"; const Glow = ({ className = "" }) => (
{ + // Dispatch custom event to open navbar + if (typeof window !== "undefined") { + window.dispatchEvent(new CustomEvent("open-navigation")); + } + + // Also scroll to next section if needed + window.scrollTo({ + top: window.innerHeight, + behavior: 'smooth' + }); + }; + return (
{/* Content Section */}
-
+
+ + {/* Main Content Container */} THE OFFICIAL MACHINE LEARNING CLUB OF NIT ROURKELA + + {/* Eye-catching Learn More Button */} + + {/* Glow effect behind button */} +
+ + {/* Button text and icon */} +
+ + EXPLORE ML4E + + +
+ + {/* Animated border effect */} +
+ + {/* Pulsing ring effect */} +
+ + {/* Neural connection dots effect */} +
+
+
@@ -939,7 +348,6 @@ export default function Home() {
@@ -952,7 +360,6 @@ export default function Home() { ))} - {/* Disable controls on mobile */} {!isMobile && ( - {/* Overlay for mobile to allow scrolling through the canvas */} {isMobile && (
)}
- - {/* Add scrollable content area */} -
); diff --git a/src/app/page.tsx b/src/app/page.tsx index 6627027..e8b7f30 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,18 +1,5 @@ -// "use client" -// import dynamic from "next/dynamic"; -// import Footer from "./components/Footer" -// const Home = dynamic(() => import("./components/Home"), { ssr: false }); -// export default function App() { -// return ( -// <> -// -// {/* */} -//