From cc6d5f5fb6bbb23e88a95752a6e5265323d1c7d9 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@63.com> Date: 星期五, 17 十二月 2021 09:00:03 +0800 Subject: [PATCH] # --- static/js/app.js | 30 ++++++++++++++++++------------ 1 files changed, 18 insertions(+), 12 deletions(-) diff --git a/static/js/app.js b/static/js/app.js index 8545e93..d21848e 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -42,7 +42,8 @@ this.stats.end(); // this.queryTask(); this.queryCrn(); - this.modelMove(); + // this.modelMove(); + this.crnMove(); } this.initScene = function () { this.scene = new THREE.Scene(); @@ -191,7 +192,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,10 +281,10 @@ for (let crnData of CrnDatas) { let crnTask = getArrVal(this.crnTasks, "crnNo", crnData.crnNo); if (null == crnTask) { - // let crnFork = getArrVal(this.objects, "name", wrkMast.crnNo + "-fork"); - this.crnTasks.push(new CrnTask(crnData)); + this.crnTasks.push(new CrnTask(crnData, this)); } else { if(!crnTask.run) { + // console.log(2) crnTask.modify(crnData); } } @@ -378,14 +379,14 @@ }); } this.initModelMove = function () { - console.log(this.wrkTasks) - for (var wrkMast of this.wrkTasks) { - this.crnBody = getArrVal(this.objects, "name", wrkMast.crnNo + "-body"); - // 鍙栬揣鐐瑰畾浣� - let sourceLocPosition = getBinPosition(wrkMast.sourceLocNo); - let points = [new THREE.Vector3(this.crnBody.position.x, this.crnBody.position.y, this.crnBody.position.z), sourceLocPosition]; - this.curve = new Route(points); - } + console.log(this.crnTasks) + // for (var wrkMast of this.wrkTasks) { + // this.crnBody = getArrVal(this.objects, "name", wrkMast.crnNo + "-body"); + // // 鍙栬揣鐐瑰畾浣� + // let sourceLocPosition = getBinPosition(wrkMast.sourceLocNo); + // let points = [new THREE.Vector3(this.crnBody.position.x, this.crnBody.position.y, this.crnBody.position.z), sourceLocPosition]; + // this.curve = new Route(points); + // } } this.modelMove = function () { @@ -401,6 +402,11 @@ } } } + this.crnMove = function (object) { + for (let crnTask of this.crnTasks) { + crnTask.move(); + } + } }, }; -- Gitblit v1.9.1