PerspectiveCamera
A responsive THREE.PerspectiveCamera that can set itself as the default.
import { PerspectiveCamera } from '@react-three/drei'
<PerspectiveCamera
makeDefault // Registers it as the default camera system-wide (default=false)
{...props} // All THREE.PerspectiveCamera props are valid
/>
<mesh />
You can also give it children, which will now occupy the same position as the camera and follow along as it moves.
import { PerspectiveCamera } from '@react-three/drei'
;<PerspectiveCamera makeDefault {...props}>
<mesh />
</PerspectiveCamera>
You can also drive it manually, it won't be responsive and you have to calculate aspect ration yourself.
import { PerspectiveCamera } from '@react-three/drei'
<PerspectiveCamera manual aspect={...} onUpdate={(c) => c.updateProjectionMatrix()}>