#
luxiaotao1123
2021-12-13 2f6c32fbfbd3696ed3ccce3b89158e4a5876ddc5
static/js/app.js
@@ -14,6 +14,8 @@
      this.firstTime = 1;
      this.stats = null;
      this.goodTypes=[];//存储所有的库位类型
      this.wrkNo = 0;
      this.wrkTasks = [];// 任务列表
      this.start = function () {
         this.initMain();
@@ -29,7 +31,7 @@
         this.initLight();
         this.initFloor();
         this.initModel();
         this.initModel0();
         this.queryTask();
         this.initStoreObjects(this);
      }
      this.animate = function () {
@@ -37,7 +39,7 @@
         this.stats.begin();
         this.renderer.render(this.scene, this.camera);
         this.stats.end();
         this.modelMove();
         // this.modelMove();
      }
      this.initScene = function () {
         this.scene = new THREE.Scene();
@@ -57,7 +59,7 @@
         // this.camera.position.z = 600;
         // //相机的朝向
         // this.camera.lookAt(0, 0, 0);
         this.camera.position.set( - 550, 2070, 4550 );
         this.camera.position.set( - 350, 1070, 1550 );
         this.camera.lookAt( this.scene.position );
         //将相机放到场景中
         this.scene.add(this.camera);
@@ -256,12 +258,15 @@
               //
               //    }
               // }
               this.firstTime = 0;
               // this.firstTime = 0;
            }
         }
      }
      this.initModel0 = function () {
      this.queryTask = function () {
         if (this.firstTime === 1) {
            queryTaskCurrent();
            this.wrkTasks = TaskData;
         }
      }
      this.getExistedGoodType=function(state){
         for (let i=0;i<this.goodTypes.length;i++) {
@@ -348,7 +353,12 @@
            });
      }
      this.modelMove = function () {
         for (var wrkMast of this.wrkTasks) {
            console.log(wrkMast)
            let crnBody = getArrVal(this.objects, "name", wrkMast.crnNo + "-body");
            console.log(crnBody.position);
         }
      }
   },