import React from 'react'; import { useFrame } from '@react-three/fiber'; import * as THREE from 'three'; const Sun = ({ onClick }) => { const sunRef = React.useRef(); useFrame((state) => { if (sunRef.current) { sunRef.current.rotation.y = state.clock.getElapsedTime() * 0.02; sunRef.current.rotation.z = state.clock.getElapsedTime() * 0.01; } }); return ( document.body.style.cursor = 'pointer'} onPointerOut={() => document.body.style.cursor = 'auto'} > {/* Sun glow effect */} ); }; export default Sun;