New file |
| | |
| | | import React from 'react'; |
| | | import { Grid } from '@react-three/drei'; |
| | | |
| | | const GridModule = (gridConfig) => { |
| | | return ( |
| | | <Grid |
| | | args={[100000, 100000, 100, 100]} |
| | | rotation={[0, 0, 0]} |
| | | position={[0, -10, 0]} |
| | | receiveShadow |
| | | cellColor="#6f6f6f" |
| | | cellSize={50} |
| | | sectionSize={100} |
| | | sectionThickness={1} |
| | | cellThickness={1} |
| | | sectionColor="#9d4b4b" |
| | | fadeDistance={10000} |
| | | material={<meshStandardMaterial color="#aa" />} |
| | | {...gridConfig} |
| | | ></Grid> |
| | | ); |
| | | }; |
| | | |
| | | export default GridModule; |
| | |
| | | import Camera from '@/components/camera' |
| | | import Buildings from '@/components/buidings' |
| | | import TreeGroup from '../components/tree-group' |
| | | import GridModule from '../components/grid' |
| | | |
| | | const Base = (props) => { |
| | | return ( |
| | |
| | | <Sky distance={450000} sunPosition={[0, 1, 0]} inclination={0} azimuth={0.25} /> |
| | | <Buildings /> |
| | | <TreeGroup /> |
| | | <TreeGroup /> |
| | | <Box position={[0, 0, 0]} /> |
| | | <OrbitControls /> |
| | | <Environment background preset="warehouse" /> |