From 3f41ad8cf82b08585e89815feadb5a17938b3033 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 15 五月 2024 16:07:26 +0800
Subject: [PATCH] #
---
src/components/camera.jsx | 36 +-----------------------------------
1 files changed, 1 insertions(+), 35 deletions(-)
diff --git a/src/components/camera.jsx b/src/components/camera.jsx
index a1812b9..b450ce9 100644
--- a/src/components/camera.jsx
+++ b/src/components/camera.jsx
@@ -2,51 +2,17 @@
import { useThree } from '@react-three/fiber';
import {
PerspectiveCamera,
- CameraControls,
- PresentationControls,
- FlyControls,
- OrbitControls,
- FirstPersonControls,
- MapControls,
} from '@react-three/drei';
const Camera = (props) => {
const threeObj = useThree();
const camera = threeObj.camera;
- const [choiceCtrls, setChoiceCtrls] = useState(true);
-
- 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]}
+ position={[0, 350, 1150]}
fov={48}
near={1}
far={100000}
--
Gitblit v1.9.1