From 173a8c329ac743625ba958ff8e5462e67308110b Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期五, 18 三月 2022 13:11:29 +0800
Subject: [PATCH] #
---
static/js/object/StoreShelf.js | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/static/js/object/StoreShelf.js b/static/js/object/StoreShelf.js
index c583ea0..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.MeshPhysicalMaterial({
color: 0x175EC0,
- transparent: true,
+ 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