| | |
| | | // 添加场景相机 |
| | | import { useThree, PerspectiveCameraProps } from '@react-three/fiber'; |
| | | import React, { useState, useEffect } from 'react'; |
| | | import { useThree } from '@react-three/fiber'; |
| | | import { |
| | | PerspectiveCamera, |
| | | CameraControls, |
| | |
| | | FirstPersonControls, |
| | | MapControls, |
| | | } from '@react-three/drei'; |
| | | import React, { useState, useEffect } from 'react'; |
| | | |
| | | const Camera = (props) => { |
| | | const threeObj = useThree(); |
| | | const camera = threeObj.camera; |
| | | |
| | | const [choiceCtrls, setChoiceCtrls] = useState(true); |
| | | const mobxStore = useContext(ThreeStoreContext); |
| | | |
| | | const flyCtrl = () => { |
| | | return ( |