#
luxiaotao1123
2021-12-11 ada814580615bd5b7d25013525f8054edfce2800
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);