From ada814580615bd5b7d25013525f8054edfce2800 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期六, 11 十二月 2021 15:00:05 +0800
Subject: [PATCH] #

---
 static/js/object/StoreShelf.js |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/static/js/object/StoreShelf.js b/static/js/object/StoreShelf.js
index fd6b3f6..98bea40 100644
--- a/static/js/object/StoreShelf.js
+++ b/static/js/object/StoreShelf.js
@@ -18,7 +18,7 @@
     let group = new THREE.Group();
 
     // 璐ф灦鎬婚珮
-    let shelfHeight=this.bottomHight+(this.binYNum-1)*this.binHeight;
+    let shelfHeight=this.bottomHight+(this.binYNum)*this.binHeight;
     // 璐ф灦鎬诲
     let shelfWidth=this.binZNum*this.binWidth;
     // 鏀灦妯″瀷 + 鏉愯川
@@ -39,7 +39,7 @@
     // 鍒濆鍖栨敮鏋舵ā鍨�
     for(let i=0;i<=this.binZNum;i++) {
         let leftRack = rackObject.clone();
-        let positionZ = this.positionZ - shelfWidth/2 + i*this.binWidth;
+        let positionZ = - ( this.positionZ + i*this.binWidth );
         leftRack.position.set(leftPositionX,positionY,positionZ);
         leftRack.updateMatrix();
         group.add(leftRack);
@@ -51,10 +51,10 @@
     }
     // 鍒濆鍖栨墭鏉挎ā鍨�
     for(let i = 0;i < this.binZNum;i++) {
-        for (let j = 0;j < this.binYNum;j++) {
+        for (let j = 0;j <= this.binYNum;j++) {
             let plane = planeObject.clone();
             let positionY= this.positionY + this.bottomHight + j*this.binHeight + 1;
-            let positionZ= this.positionZ - shelfWidth/2 + i * this.binWidth + this.binWidth/2;
+            let positionZ= - ( this.positionZ + i * this.binWidth + this.binWidth/2 );
             plane.position.set(this.positionX-this.rackLengh/2,positionY,positionZ);
             plane.updateMatrix();
             group.add(plane);

--
Gitblit v1.9.1