#
luxiaotao1123
2021-12-09 c337cc2f63bfa52cac10bf56fdb82e9695e9c64e
#
1个文件已修改
10 ■■■■ 已修改文件
static/js/object/StoreShelf0.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/js/object/StoreShelf0.js
@@ -30,21 +30,21 @@
    let rackBoxGeometry=new THREE.BoxGeometry(this.rackLengh,shelfHeight,this.rackWidth);
    let rackObject=new THREE.Mesh(rackBoxGeometry, shelfMat, 0);
    // 托板模型 + 材质
    let planeBoxGeometry = new THREE.BoxGeometry(this.binLength+this.rackLengh, 2, this.binWidth+this.rackWidth);
    let planeBoxGeometry = new THREE.BoxGeometry(this.binLength, 2, this.binWidth+this.rackWidth);  // 覆盖多一根支架宽度
    let planeObject=new THREE.Mesh(planeBoxGeometry, shelfMat, 0);
    // Y轴定位
    let positionY = this.positionY + shelfHeight / 2;
    //左侧支架柱的X轴定位
    let leftPositionX=this.positionX-this.binLength/2-this.rackLengh/2;
    let leftPositionX=this.positionX-this.binLength/2;
    //右侧支架柱的X轴定位
    let rightPositionX=this.positionX+this.binLength/2-this.rackLengh/2;
    let rightPositionX=this.positionX+this.binLength/2 - this.rackLengh;    // 缩进支架长度
    // 初始化支架模型
    for(let i=0;i<=this.binZNum;i++) {
        let leftRack = rackObject.clone();
        let positionZ = this.positionZ - shelfWidth/2 + i*this.binWidth + this.rackWidth/2;
        let positionZ = this.positionZ - shelfWidth/2 + i*this.binWidth;
        leftRack.position.set(leftPositionX,positionY,positionZ);
        leftRack.updateMatrix();
        group.add(leftRack);
@@ -59,7 +59,7 @@
        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+this.rackWidth/2;
            let positionZ= this.positionZ - shelfWidth/2 + i * this.binWidth + this.binWidth/2;
            plane.position.set(this.positionX-this.rackLengh/2,positionY,positionZ);
            plane.updateMatrix();
            group.add(plane);