有什么方法可以访问controls
场景的实例react-three-fiber
吗?
我知道可以使用以下引用来访问它:
import { useFrame } from 'react-three-fiber'
const controls = useRef()
useFrame(state => controls.current.update())
return <orbitControls ref={controls} />
但我正在寻找某种全球访问方式,例如:
const {
gl, // WebGL renderer
scene, // Default scene
camera, // Default camera
} = useThree()