import { useRef, useMemo } from 'react' import { Canvas, useFrame } from '@react-three/fiber' import { Points, PointMaterial } from '@react-three/drei' import * as random from 'maath/random/dist/maath-random.esm' function ParticleField(props) { const ref = useRef() // Generate random points in a sphere const sphere = useMemo(() => random.inSphere(new Float32Array(5000), { radius: 1.5 }), []) useFrame((state, delta) => { ref.current.rotation.x -= delta / 10 ref.current.rotation.y -= delta / 15 }) return ( ) } export default function ThreeBackground() { return (
{/* Gradient overlay to blend canvas into page */}
) }