import { useRef } from 'react' import { useFrame } from '@react-three/fiber' export default function Sphere({ position = [0, 0, 0], ...props }) { const meshRef = useRef() // Floating animation useFrame((state) => { const time = state.clock.elapsedTime meshRef.current.position.y = position[1] + Math.sin(time * 2) * 0.5 meshRef.current.rotation.y = time * 0.5 }) return ( ) }