#
luxiaotao1123
2021-12-13 4b3467e05cb0e2b68bc3e8ef08827e9e874562c8
static/js/object/StoreShelf.js
@@ -1,4 +1,4 @@
function StoreShelf0(option) {
function StoreShelf(option) {
    this.binLength = option.binLength||50;//库位长度
    this.binWidth = option.binWidth||50;//库位宽
    this.binHeight = option.binHeight||50;//库位高
@@ -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);