#
luxiaotao1123
2021-12-17 5558da2487fc367badb01a9feb4c9e0e9ffa76f3
static/js/app.js
@@ -2,6 +2,7 @@
import Stats from './lib/stats.module.js';
import {MTLLoader} from './lib/MTLLoader.js';
import {OBJLoader} from './lib/OBJLoader.js';
import {StoreShelf} from './object/StoreShelf.js';
var APP = {
@@ -42,7 +43,8 @@
         this.stats.end();
         // this.queryTask();
         this.queryCrn();
         this.modelMove();
         // this.modelMove();
         this.crnMove();
      }
      this.initScene = function () {
         this.scene = new THREE.Scene();
@@ -191,7 +193,7 @@
            initStore();
            if (Store3DData !== null) {
               for(var group of Store3DData.data.store.groups) {
                  let crn = new StoreCrn(group.crn, object);
                  new StoreCrn(group.crn, object);
                  for (var line of group.lines) {
                     let shelf = new StoreShelf(line);
                     object.addObject(shelf);
@@ -280,9 +282,10 @@
            for (let crnData of CrnDatas) {
               let crnTask = getArrVal(this.crnTasks, "crnNo", crnData.crnNo);
               if (null == crnTask) {
                  this.crnTasks.push(new CrnTask(crnData));
                  this.crnTasks.push(new CrnTask(crnData, this));
               } else {
                  if(!crnTask.run) {
                     // console.log(2)
                     crnTask.modify(crnData);
                  }
               }
@@ -400,6 +403,11 @@
            }
         }
      }
      this.crnMove = function (object) {
         for (let crnTask of this.crnTasks) {
            crnTask.move();
         }
      }
   },
};