From 03421f49b51b92f675d0bd0cae9d0ba341001b92 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期三, 22 六月 2022 10:50:03 +0800
Subject: [PATCH] #

---
 static/js/object/StoreShelf.js |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/static/js/object/StoreShelf.js b/static/js/object/StoreShelf.js
index 63262ba..b1761e0 100644
--- a/static/js/object/StoreShelf.js
+++ b/static/js/object/StoreShelf.js
@@ -13,15 +13,16 @@
     this.positionZ = option.position.z||0;//搴撲綅浣嶇疆
     this.rackLengh = 3;//鏀灦鐨勯暱搴︼紝榛樿璁惧姩涓�3
     this.rackWidth = 3;//鏀灦鐨勫搴︼紝榛樿璁惧畾涓�3
+    this.mesh = null;
 
     // 鏉愯川
-    let shelfMat = new THREE.MeshLambertMaterial({
+    let shelfMat = new THREE.MeshPhysicalMaterial({
         color: 0x175EC0,
-        transparent: true,
-        opacity: .6
-    });//瀹氫箟鏀灦鍜屾墭鐩樼殑鏉愯川
+        transparent: false,
+        opacity: 0.7
+    });
     //瀹氫箟涓�涓粍鍚堜綋
-    let group = new THREE.Group();
+    // let group = new THREE.Group();
 
     // 璐ф灦鎬婚珮
     let shelfHeight=this.bottomHight+(this.binYNum)*this.binHeight;
@@ -92,7 +93,10 @@
     }
 
     let mergedGeometry = BufferGeometryUtils.mergeBufferGeometries(geometries);
-    return  new THREE.Mesh(mergedGeometry, shelfMat);
+    let mesh = new THREE.Mesh(mergedGeometry, shelfMat);
+    mesh.castShadow = true;
+    this.mesh = mesh;
+    return this;
 }
 
 export {StoreShelf}

--
Gitblit v1.9.1