#
luxiaotao1123
2022-04-07 4c21e56efdf3acfcd560055fca0969d4868e200c
static/js/app.js
@@ -12,7 +12,7 @@
import {StoreCrn} from './object/StoreCrn.js';
import {StoreConvey} from './object/StoreConvey.js';
import {StoreGoods} from './object/StoreGoods.js';
import {StaTask} from './object/StaTask.js';
var APP = {
@@ -27,6 +27,7 @@
      this.outlinePass = null;
      this.goodTypes=[];//存储所有的库位类型
      this.crnTasks = [];// 堆垛机列表
      this.staTasks = [];// 输送线列表
      this.moveForward = false;//是否向前运行
      this.moveBackward = false;//是否向后运行
      this.moveLeft = false;//是否向左运行
@@ -72,7 +73,8 @@
         this.stats.end();
         this.queryCrn();
         this.crnMove();
         this.staMove()
         this.querySta();
         this.staChange();
      }
      this.initScene = function () {
         this.scene = new THREE.Scene();
@@ -178,7 +180,7 @@
         this.composer.addPass( this.fxaaPass );
      }
      this.initObjectSelect = function(){
         new ObjectSelect(this.scene, this.camera, this.outlinePass);
         new ObjectSelect(this.scene, this.camera, this.outlinePass, this);
      }
      this.initPointLockControl = function(object){
         this.controls = new PointerLockControls( this.camera, document.body );
@@ -357,15 +359,29 @@
            }
         }
      }
      this.crnMove = function (object) {
      this.crnMove = function () {
         for (let crnTask of this.crnTasks) {
            crnTask.move();
         }
      }
      this.staMove = function (object) {
         // for (let crnTask of this.crnTasks) {
         //    crnTask.move();
         // }
      this.querySta = function () {
         if (StaDatas !== null && this.firstTime === 0) {
            for (let staData of StaDatas) {
               let staTask = getArrVal(this.staTasks, "no", staData.no);
               if (null == staTask) {
                  this.staTasks.push(new StaTask(staData, this));
               } else {
                  if(!staTask.run) {
                     staTask.modify(staData);
                  }
               }
            }
         }
      }
      this.staChange = function () {
         for (let staTask of this.staTasks) {
            staTask.change();
         }
      }
      // 功能方法区