From 9d2fb8eb69b8ec958ef9ea20f135f8ef8bd73a74 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期二, 28 六月 2022 13:40:08 +0800
Subject: [PATCH] #

---
 static/js/object/StoreShelf.js |   33 ++++++++++++++++++++++++++-------
 1 files changed, 26 insertions(+), 7 deletions(-)

diff --git a/static/js/object/StoreShelf.js b/static/js/object/StoreShelf.js
index 2e449c4..cf49404 100644
--- a/static/js/object/StoreShelf.js
+++ b/static/js/object/StoreShelf.js
@@ -28,6 +28,7 @@
     let rackBoxGeometry=new THREE.BoxGeometry(this.rackLengh,shelfHeight,this.rackWidth);
     // 鎵樻澘妯″瀷 + 鏉愯川
     let planeBoxGeometry = new THREE.BoxGeometry(this.binLength, 2, this.binWidth+this.rackWidth);  // 瑕嗙洊澶氫竴鏍规敮鏋跺搴�
+    let planeRackBoxGeometry = new THREE.BoxGeometry(3, 2, this.binWidth+this.rackWidth);
 
     // Y杞村畾浣�
     let positionY = this.positionY + shelfHeight / 2;
@@ -58,13 +59,31 @@
     // 鍒濆鍖栨墭鏉挎ā鍨�
     for(let i = 0;i < this.binZNum;i++) {
         for (let j = 0;j <= this.binYNum;j++) {
-            let clone = planeBoxGeometry.clone();
-            let positionY= this.positionY + this.bottomHight + j*this.binHeight + 1;
-            let positionZ= - ( this.positionZ + i * this.binWidth + this.binWidth/2 );
-            transform.position.set(this.positionX-this.rackLengh/2,positionY,positionZ);
-            transform.updateMatrix();
-            clone.applyMatrix4(transform.matrix);
-            geometries.push(clone);
+            if (j !== this.binYNum) {
+                let leftClone = planeRackBoxGeometry.clone();
+                let positionY = this.positionY + this.bottomHight + j*this.binHeight + 1;
+                let positionZ = - ( this.positionZ + i * this.binWidth + this.binWidth/2 );
+                transform.position.set(this.positionX - 16, positionY, positionZ);
+                transform.updateMatrix();
+                leftClone.applyMatrix4(transform.matrix);
+                geometries.push(leftClone);
+
+                let rightClone = planeRackBoxGeometry.clone();
+                positionY = this.positionY + this.bottomHight + j*this.binHeight + 1;
+                positionZ = - ( this.positionZ + i * this.binWidth + this.binWidth/2 );
+                transform.position.set(this.positionX + 13, positionY, positionZ);
+                transform.updateMatrix();
+                rightClone.applyMatrix4(transform.matrix);
+                geometries.push(rightClone);
+            } else {
+                let clone = planeBoxGeometry.clone();
+                let positionY= this.positionY + this.bottomHight + j*this.binHeight + 1;
+                let positionZ= - ( this.positionZ + i * this.binWidth + this.binWidth/2 );
+                transform.position.set(this.positionX-this.rackLengh/2,positionY,positionZ);
+                transform.updateMatrix();
+                clone.applyMatrix4(transform.matrix);
+                geometries.push(clone);
+            }
         }
     }
 

--
Gitblit v1.9.1