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 |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

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

--
Gitblit v1.9.1