From 4c9f92527ec05fc6be9d0115ac3cf28b007ba8f0 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期六, 11 五月 2024 13:15:59 +0800 Subject: [PATCH] # --- src/components/camera.jsx | 40 ++-------------------------------------- 1 files changed, 2 insertions(+), 38 deletions(-) diff --git a/src/components/camera.jsx b/src/components/camera.jsx index 1fbbc1b..2ff0105 100644 --- a/src/components/camera.jsx +++ b/src/components/camera.jsx @@ -1,51 +1,15 @@ -// 娣诲姞鍦烘櫙鐩告満 -import { useThree, PerspectiveCameraProps } from '@react-three/fiber'; +import React, { useState, useEffect } from 'react'; +import { useThree } from '@react-three/fiber'; import { PerspectiveCamera, - CameraControls, - PresentationControls, - FlyControls, - OrbitControls, - 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 ( - <group> - <FirstPersonControls - far={100000} - movementSpeed={100} - activeLook={false} - lookVertical={true} - ></FirstPersonControls> - {/* <OrbitControls /> */} - <MapControls zoomSpeed={0.1} /> - </group> - ); - }; - - const ctrl = () => { - return ( - <group> - {/* 鐩告満鎺у埗鍣� */} - {/* <PresentationControls /> */} - <CameraControls /> - {/* <PointerCtrl /> */} - </group> - ); - }; return ( <> - {choiceCtrls ? ctrl() : flyCtrl()} <PerspectiveCamera makeDefault position={[-100, 200, 1000]} -- Gitblit v1.9.1