| | |
| | | this.stats.end(); |
| | | this.queryCrn(); |
| | | this.crnMove(); |
| | | this.staMove() |
| | | } |
| | | this.initScene = function () { |
| | | this.scene = new THREE.Scene(); |
| | |
| | | if (line.bins !== null) { |
| | | new StoreGoods(object, line.bins, shelf); |
| | | } |
| | | //显示库位上的货物 |
| | | // for (var bin of line.bins) { |
| | | // let existGoods=this.getExistedGoodType(bin.State); |
| | | // let storeGoods = new StoreGoods(optionGroup, bin); |
| | | // if(existGoods==null) { |
| | | // let goods=storeGoods.create(); |
| | | // object.addObject(goods); |
| | | // this.goodTypes.push({type: bin.State, object: goods}); |
| | | // } else { |
| | | // let goods= storeGoods.clone(existGoods); |
| | | // object.addObject(goods); |
| | | // } |
| | | // } |
| | | |
| | | } |
| | | } |
| | | this.firstTime = 0; |
| | |
| | | } |
| | | } |
| | | } |
| | | this.getExistedGoodType=function(state){ |
| | | for (let i=0;i<this.goodTypes.length;i++) { |
| | | let type=this.goodTypes[i]; |
| | | if(type.type===state) { |
| | | return type.object; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | this.crnMove = function (object) { |
| | | for (let crnTask of this.crnTasks) { |
| | | crnTask.move(); |
| | | } |
| | | } |
| | | this.staMove = function (object) { |
| | | // for (let crnTask of this.crnTasks) { |
| | | // crnTask.move(); |
| | | // } |
| | | } |
| | | |
| | | // 功能方法区 |
| | | this.changeStats = function () { |