Edit this page on GitHub
function Camera(props) {const ref = useRef()const { setDefaultCamera } = useThree()// Make the camera known to the systemuseEffect(() => void setDefaultCamera(ref.current), [])// Update it every frameuseFrame(() => ref.current.updateMatrixWorld())return <perspectiveCamera ref={ref} {...props} />}<Canvas><Camera position={[0, 0, 10]} />