| | |
| | | import React, { useRef } from 'react'; |
| | | import { SpotLight, useDepthBuffer, useHelper } from '@react-three/drei'; |
| | | import { SpotLightHelper } from 'three'; |
| | | |
| | | const Lights = () => { |
| | | const spotLightRef = useRef(); |
| | | |
| | | useHelper(spotLightRef, SpotLightHelper, 'teal'); |
| | | |
| | | return ( |
| | | <> |
| | | <ambientLight intensity={0.5} /> |
| | | <directionalLight color={0xffffff} intensity={3} position={[10, 10, 0]} /> |
| | | <SpotLight |
| | | color="#fff" |
| | | position={[3, 2000, 2]} |
| | | ref={spotLightRef} |
| | | color="#ffffff" |
| | | position={[3, 700, 2]} |
| | | castShadow |
| | | penumbra={2} |
| | | distance={6000} |