"use client"; import React, { useRef, useMemo } from 'react'; import { Canvas, useFrame } from '@react-three/fiber'; import * as THREE from 'three'; function ParticleRing() { const pointsRef = useRef(null); const particleCount = 500; const positions = useMemo(() => { const pos = new Float32Array(particleCount * 3); const radius = 2.5; for (let i = 0; i < particleCount; i++) { const theta = Math.random() * Math.PI * 2; const r = radius + (Math.random() - 0.5) * 0.5; pos[i * 3] = Math.cos(theta) * r; pos[i * 3 + 1] = (Math.random() - 0.5) * 0.5; pos[i * 3 + 2] = Math.sin(theta) * r; } return pos; }, []); useFrame((_, delta) => { if (pointsRef.current) { pointsRef.current.rotation.y += delta * 0.15; pointsRef.current.rotation.x += delta * 0.05; } }); return ( ); } export default function Gate() { return (
); }