From f9b82b114317e5d60f0537685b194da47136e478 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期五, 07 一月 2022 09:45:30 +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