| | |
| | | import React, { useRef } from 'react'; |
| | | import { SpotLight, useDepthBuffer, useHelper } from '@react-three/drei'; |
| | | import { SpotLightHelper } from 'three'; |
| | | // import { SpotLightHelper } from 'three'; |
| | | |
| | | const Lights = () => { |
| | | const spotLightRef = useRef(); |
| | | |
| | | useHelper(spotLightRef, SpotLightHelper, 'teal'); |
| | | // useHelper(spotLightRef, SpotLightHelper, 'teal'); |
| | | |
| | | return ( |
| | | <> |
| | |
| | | <SpotLight |
| | | ref={spotLightRef} |
| | | color="#ffffff" |
| | | position={[3, 700, 2]} |
| | | position={[3, 900, 2]} |
| | | castShadow |
| | | penumbra={2} |
| | | distance={6000} |
| | | distance={5000} |
| | | angle={Math.PI * 0.6} |
| | | attenuation={5} |
| | | anglePower={Math.PI / 2} |
| | | intensity={6} |
| | | intensity={5} |
| | | shadow-mapSize={[1024, 1024]} |
| | | shadow-camera-near={200} |
| | | shadow-camera-far={2000} |