'use client'; import { Canvas, useFrame } from '@react-three/fiber'; import { Points, PointMaterial, Float } from '@react-three/drei'; import { useState, useRef } from 'react'; import * as random from 'maath/random/dist/maath-random.esm'; function Stars(props) { const ref = useRef(); const [sphere] = useState(() => random.inSphere(new Float32Array(5000), { radius: 1.5 })); useFrame((state, delta) => { if (ref.current) { ref.current.rotation.x -= delta / 10; ref.current.rotation.y -= delta / 15; } }); return ( ); } function DataTunnel() { const meshRef = useRef(); useFrame((state) => { if(meshRef.current) { meshRef.current.rotation.z = state.clock.elapsedTime * 0.1; } }); return ( ) } export default function Background() { return (
); }