#
luxiaotao1123
2024-04-19 e06a9d9be77e1528dc6f7b77d691cec4066a76a8
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
26
27
import React, { useRef } from 'react';
import { SpotLight, useDepthBuffer, useHelper } from '@react-three/drei';
 
const Lights = () => {
    return (
        <>
            <ambientLight intensity={0.5} />
            <directionalLight color={0xffffff} intensity={3} position={[10, 10, 0]} />
            <SpotLight
                color="#fff"
                position={[3, 2000, 2]}
                castShadow
                penumbra={2}
                distance={6000}
                angle={Math.PI * 0.6}
                attenuation={5}
                anglePower={Math.PI / 2}
                intensity={6}
                shadow-mapSize={[1024, 1024]}
                shadow-camera-near={200}
                shadow-camera-far={2000}
            />
        </>
    );
};
 
export default Lights;