| | |
| | | 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} |
| | |
| | | import { Canvas, useFrame } from '@react-three/fiber' |
| | | import { OrbitControls } from '@react-three/drei' |
| | | import { Environment, Sky } from '@react-three/drei' |
| | | import Help from '@/components/help' |
| | | import Lights from '@/components/light' |
| | | import Camera from '@/components/camera' |
| | | import Buildings from '@/components/buidings' |
| | | import Help from '../components/help' |
| | | import Lights from '../components/light' |
| | | import Camera from '../components/camera' |
| | | import Buildings from '../components/buidings' |
| | | import TreeGroup from '../components/tree-group' |
| | | import House from '../components/house' |
| | | |