import { Canvas, useFrame } from '@react-three/fiber' import { useRef } from 'react' function SolarSystem() { const earthOrbitRef = useRef() const moonOrbitRef = useRef() const earthRef = useRef() useFrame((_, delta) => { earthOrbitRef.current.rotation.y += delta * 0.9 moonOrbitRef.current.rotation.y += delta * 2.2 earthRef.current.rotation.y += delta * 2.1 }) return ( <> ) } function App() { return ( ) } export default App