| | |
| | | const House = (props) => { |
| | | const { |
| | | wallThickness = 2, |
| | | wallOpacity = .6, |
| | | width = DEBUG ? 14000 : 1400, |
| | | length = DEBUG ? 12000 : 1200, |
| | | height = DEBUG ? 4000 : 400, |
| | |
| | | { depth: wallThickness }, |
| | | ]} |
| | | /> |
| | | <meshPhongMaterial map={texture} metalness={1.0} reflectivity={1.5}></meshPhongMaterial> |
| | | <meshPhongMaterial map={texture} metalness={1.0} reflectivity={1.5} transparent={true} opacity={wallOpacity}></meshPhongMaterial> |
| | | </mesh> |
| | | {/* 后面的路 */} |
| | | <mesh rotation={[Math.PI / 2, 0, 0]}> |
| | |
| | | { depth: wallThickness }, |
| | | ]} |
| | | /> |
| | | <meshPhongMaterial map={texture} metalness={1.0} reflectivity={1.5}></meshPhongMaterial> |
| | | <meshPhongMaterial map={texture} metalness={1.0} reflectivity={1.5} transparent={true} opacity={wallOpacity}></meshPhongMaterial> |
| | | </mesh> |
| | | {/* 前面的墙壁下面的路 */} |
| | | <mesh rotation={[Math.PI / 2, 0, 0]}> |
| | |
| | | receiveShadow |
| | | > |
| | | <extrudeGeometry args={[getBackWallShape(), { depth: wallThickness }]} /> |
| | | <meshPhysicalMaterial map={texture} metalness={1.0} roughness={0.8}></meshPhysicalMaterial> |
| | | <meshPhysicalMaterial map={texture} metalness={1.0} roughness={0.8} |
| | | transparent={true} |
| | | opacity={wallOpacity} |
| | | ></meshPhysicalMaterial> |
| | | </mesh> |
| | | <mesh rotation={[Math.PI / 2, 0, 0]}> |
| | | <LeftRoad></LeftRoad> |
| | |
| | | color={'#0069c5'} |
| | | metalness={1.0} |
| | | roughness={0.8} |
| | | transparent={true} |
| | | opacity={wallOpacity} |
| | | ></meshPhysicalMaterial> |
| | | </mesh> |
| | | {/* 顶部第二层 */} |
| | |
| | | color={'#4895f6'} |
| | | metalness={1.0} |
| | | roughness={0.8} |
| | | transparent={true} |
| | | opacity={wallOpacity} |
| | | ></meshPhysicalMaterial> |
| | | </mesh> |
| | | {/* 顶部第三层 */} |
| | |
| | | map={roofTexture} |
| | | metalness={1.0} |
| | | roughness={0.8} |
| | | transparent={true} |
| | | opacity={wallOpacity} |
| | | ></meshPhysicalMaterial> |
| | | </mesh> |
| | | </group> |