// "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 (
//
//
//
// );
// }
// 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)
//
//
//
//
//
//
//
//
// );
// }
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 = 18, // Fixed node count instead of random
}) {
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",
];
// Fixed number of structures (18 as requested between 12-24)
const fixedStructureCount = 18;
for (let i = 0; i < fixedStructureCount; 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: 18, // Fixed node count for all structures
});
}
return (
{/* Content Section - Now scrollable on mobile */}
MACHINE LEARNING FOR EVERYONE (ML4E)
{/* Canvas with fixed height and proper z-index */}
{/* Add some scrollable content to demonstrate scrolling */}
);
}