#
luxiaotao1123
2024-04-19 a298ccbb1753785cfd045fe96f0e8eb2acfd8007
src/pages/base.jsx
@@ -5,14 +5,25 @@
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'
const Base = (props) => {
    return (
        <div style={{ height: '100%', width: '100%' }}>
            <Canvas>
            <Canvas
                shadows
                gl={{
                    logarithmicDepthBuffer: true,
                }}
            >
                <Lights />
                {/* <Camera /> */}
                <Camera />
                <Sky distance={450000} sunPosition={[0, 1, 0]} inclination={0} azimuth={0.25} />
                <Buildings />
                <TreeGroup />
                <House />
                <Box position={[0, 0, 0]} />
                <OrbitControls />
                <Environment background preset="warehouse" />
@@ -36,7 +47,7 @@
            onClick={(event) => click(!clicked)}
            onPointerOver={(event) => (event.stopPropagation(), hover(true))}
            onPointerOut={(event) => hover(false)}>
            <boxGeometry args={[1, 1, 1]} />
            <boxGeometry args={[10, 10, 10]} />
            <meshStandardMaterial color={hovered ? 'hotpink' : 'orange'} />
        </mesh>
    )