From ac3a17007eba343238d4b8916e46d64c58b0db9c Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 23 四月 2024 14:17:12 +0800
Subject: [PATCH] #
---
src/components/house.jsx | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/components/house.jsx b/src/components/house.jsx
index 90a6a18..293604d 100644
--- a/src/components/house.jsx
+++ b/src/components/house.jsx
@@ -9,6 +9,7 @@
const House = (props) => {
const {
wallThickness = 2,
+ wallOpacity = .6,
width = DEBUG ? 14000 : 1400,
length = DEBUG ? 12000 : 1200,
height = DEBUG ? 4000 : 400,
@@ -431,7 +432,7 @@
{ 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]}>
@@ -452,7 +453,7 @@
{ 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]}>
@@ -482,7 +483,10 @@
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>
@@ -517,6 +521,8 @@
color={'#0069c5'}
metalness={1.0}
roughness={0.8}
+ transparent={true}
+ opacity={wallOpacity}
></meshPhysicalMaterial>
</mesh>
{/* 椤堕儴绗簩灞� */}
@@ -530,6 +536,8 @@
color={'#4895f6'}
metalness={1.0}
roughness={0.8}
+ transparent={true}
+ opacity={wallOpacity}
></meshPhysicalMaterial>
</mesh>
{/* 椤堕儴绗笁灞� */}
@@ -543,6 +551,8 @@
map={roofTexture}
metalness={1.0}
roughness={0.8}
+ transparent={true}
+ opacity={wallOpacity}
></meshPhysicalMaterial>
</mesh>
</group>
--
Gitblit v1.9.1