|  |  |  | 
|---|
|  |  |  | import {OBJLoader} from "../lib/OBJLoader.js"; | 
|---|
|  |  |  | import * as THREE from '../three.module.js'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const palletX = -18; | 
|---|
|  |  |  | const palletY = 2; | 
|---|
|  |  |  | const palletZ = -46; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const goodsX = -17; | 
|---|
|  |  |  | const goodsY = 5; | 
|---|
|  |  |  | const goodsZ = -6; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function StoreGoods(object, data, shelf) { | 
|---|
|  |  |  | let that = this; | 
|---|
|  |  |  | that.data = data; | 
|---|
|  |  |  | 
|---|
|  |  |  | let positionY = that.shelf.bottomHight + (item.lev1-1)*that.shelf.binHeight || 0; | 
|---|
|  |  |  | let positionZ = (item.bay1-1)*-that.shelf.binHeight || 0; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | clone.position.x = -18 + positionX; | 
|---|
|  |  |  | clone.position.y = 2 + positionY; | 
|---|
|  |  |  | clone.position.z = -46 + positionZ; | 
|---|
|  |  |  | clone.name = item.loc_no + "-" + "Pallet"; | 
|---|
|  |  |  | clone.position.x = palletX + positionX; | 
|---|
|  |  |  | clone.position.y = palletY + positionY; | 
|---|
|  |  |  | clone.position.z = palletZ + positionZ; | 
|---|
|  |  |  | that.object.addObject(clone); | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | 
|---|
|  |  |  | let positionY = that.shelf.bottomHight + (item.lev1-1)*that.shelf.binHeight || 0; | 
|---|
|  |  |  | let positionZ = (item.bay1-1)*-that.shelf.binHeight || 0; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | clone.position.x = -17 + positionX; | 
|---|
|  |  |  | clone.position.y = 5 + positionY; | 
|---|
|  |  |  | clone.position.z = -6 + positionZ; | 
|---|
|  |  |  | clone.name = item.loc_no + "-" + "Goods"; | 
|---|
|  |  |  | clone.position.x = goodsX + positionX; | 
|---|
|  |  |  | clone.position.y = goodsY + positionY; | 
|---|
|  |  |  | clone.position.z = goodsZ + positionZ; | 
|---|
|  |  |  | that.object.addObject(clone); | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }); | 
|---|