#
luxiaotao1123
2024-05-15 b8bac27bcc895b540bae4c130a3c59d289736081
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import React, { useState, useEffect } from 'react';
import { useThree } from '@react-three/fiber';
import {
    PerspectiveCamera,
} from '@react-three/drei';
 
const Camera = (props) => {
    const threeObj = useThree();
    const camera = threeObj.camera;
 
    return (
        <>
            <PerspectiveCamera
                makeDefault
                position={[0, 350, 1150]}
                fov={48}
                near={1}
                far={100000}
                maxDistance={10}
            />
        </>
    );
};
 
export default Camera;