| | |
| | | this.stats.end(); |
| | | this.queryCrn(); |
| | | this.crnMove(); |
| | | this.staMove() |
| | | } |
| | | this.initScene = function () { |
| | | this.scene = new THREE.Scene(); |
| | |
| | | } |
| | | } |
| | | } |
| | | 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 () { |
| | |
| | | |
| | | setInterval(function () { |
| | | queryCrnCurrent(); |
| | | queryStaCurrent(); |
| | | },1000); |
| | | |
| | | var Store3DData; |
| | | function initStore() { |
| | | $.ajax({ |
| | | // url: 'http://47.97.1.152:58080/jkwcs/three/init/store/v1', |
| | | url: 'http://localhost:9090/jkwcs/three/init/store/v1', |
| | | type: "POST", |
| | | data: {}, |
| | | // async: false, |
| | | success: function (res) { |
| | | Store3DData = res; |
| | | } |
| | | }) |
| | | } |
| | | |
| | | var CrnDatas = null; |
| | | function queryCrnCurrent() { |
| | |
| | | }) |
| | | } |
| | | |
| | | var Store3DData; |
| | | function initStore() { |
| | | var StaDatas = null; |
| | | function queryStaCurrent() { |
| | | $.ajax({ |
| | | // url: 'http://47.97.1.152:58080/jkwcs/three/init/store/v1', |
| | | url: 'http://localhost:9090/jkwcs/three/init/store/v1', |
| | | type: "POST", |
| | | // url: 'http://47.97.1.152:58080/jkwcs/three/query/crn/cache/v1', |
| | | url: 'http://localhost:9090/jkwcs/three/query/sta/cache/v1', |
| | | type: "GET", |
| | | data: {}, |
| | | // async: false, |
| | | success: function (res) { |
| | | Store3DData = res; |
| | | StaDatas = res.data; |
| | | } |
| | | }) |
| | | |
| | | } |
| | | |
| | |
| | | objects: [ |
| | | // 链条输送机 1F 第1列 -------------------------------------------------------------------------------------------- |
| | | { |
| | | no: '1', |
| | | no: '123', |
| | | objectType: 'chain', |
| | | position: { |
| | | x: 48 + 57, |
| | |
| | | } |
| | | }, |
| | | { |
| | | no: '1', |
| | | no: '122', |
| | | objectType: 'chain', |
| | | position: { |
| | | x: 48 + 146, |
| | |
| | | } |
| | | }, |
| | | { |
| | | no: '1', |
| | | no: '121', |
| | | objectType: 'chain', |
| | | position: { |
| | | x: 48 + 287, |
| | |
| | | } |
| | | }, |
| | | { |
| | | no: '1', |
| | | no: '120', |
| | | objectType: 'chain', |
| | | position: { |
| | | x: 48 + 376, |
| | |
| | | } |
| | | }, |
| | | { |
| | | no: '1', |
| | | no: '119', |
| | | objectType: 'chain', |
| | | position: { |
| | | x: 48 + 517, |
| | |
| | | } |
| | | }, |
| | | { |
| | | no: '1', |
| | | no: '118', |
| | | objectType: 'chain', |
| | | position: { |
| | | x: 48 + 606, |
| | |
| | | } |
| | | }, |
| | | { |
| | | no: '1', |
| | | no: '117', |
| | | objectType: 'chain', |
| | | position: { |
| | | x: 48 + 747, |
| | |
| | | } |
| | | }, |
| | | { |
| | | no: '1', |
| | | no: '116', |
| | | objectType: 'chain', |
| | | position: { |
| | | x: 48 + 836, |
| | |
| | | } |
| | | }, |
| | | { |
| | | no: '1', |
| | | no: '115', |
| | | objectType: 'chain', |
| | | position: { |
| | | x: 48 + 977, |
| | |
| | | } |
| | | }, |
| | | { |
| | | no: '1', |
| | | no: '114', |
| | | objectType: 'chain', |
| | | position: { |
| | | x: 48 + 1066, |
| | |
| | | } |
| | | }, |
| | | { |
| | | no: '1', |
| | | no: '113', |
| | | objectType: 'chain', |
| | | position: { |
| | | x: 48 + 1207, |
| | |
| | | } |
| | | }, |
| | | { |
| | | no: '1', |
| | | no: '112', |
| | | objectType: 'chain', |
| | | position: { |
| | | x: 48 + 1296, |
| | |
| | | } |
| | | }, |
| | | { |
| | | no: '1', |
| | | no: '111', |
| | | objectType: 'chain', |
| | | position: { |
| | | x: 48 + 1437, |
| | |
| | | } |
| | | }, |
| | | { |
| | | no: '1', |
| | | no: '110', |
| | | objectType: 'chain', |
| | | position: { |
| | | x: 48 + 1526, |
| | |
| | | } |
| | | }, |
| | | { |
| | | no: '1', |
| | | no: '109', |
| | | objectType: 'chain', |
| | | position: { |
| | | x: 48 + 1667, |
| | |
| | | } |
| | | }, |
| | | { |
| | | no: '1', |
| | | no: '108', |
| | | objectType: 'chain', |
| | | position: { |
| | | x: 48 + 1756, |
| | |
| | | } |
| | | }, |
| | | { |
| | | no: '1', |
| | | no: '107', |
| | | objectType: 'chain', |
| | | position: { |
| | | x: 48 + 1897, |
| | |
| | | } |
| | | }, |
| | | { |
| | | no: '1', |
| | | no: '106', |
| | | objectType: 'chain', |
| | | position: { |
| | | x: 48 + 1986, |
| | |
| | | } |
| | | }, |
| | | { |
| | | no: '1', |
| | | no: '105', |
| | | objectType: 'chain', |
| | | position: { |
| | | x: 48 + 2127, |
| | |
| | | } |
| | | }, |
| | | { |
| | | no: '1', |
| | | no: '104', |
| | | objectType: 'chain', |
| | | position: { |
| | | x: 48 + 2216, |
| | |
| | | } |
| | | }, |
| | | { |
| | | no: '1', |
| | | no: '103', |
| | | objectType: 'chain', |
| | | position: { |
| | | x: 48 + 2357, |
| | |
| | | } |
| | | }, |
| | | { |
| | | no: '1', |
| | | no: '102', |
| | | objectType: 'chain', |
| | | position: { |
| | | x: 48 + 2446, |
| | |
| | | } |
| | | }, |
| | | { |
| | | no: '1', |
| | | no: '101', |
| | | objectType: 'chain', |
| | | position: { |
| | | x: 48 + 2587, |
| | |
| | | } |
| | | }, |
| | | { |
| | | no: '1', |
| | | no: '100', |
| | | objectType: 'chain', |
| | | position: { |
| | | x: 48 + 2676, |
| | |
| | | |
| | | function ObjectSelect(_scene, _camera,outlinePass) { |
| | | var raycaster = new THREE.Raycaster(); |
| | | var mouse = new THREE.Vector2(); |
| | |
| | | let positionZ = info.position.z || 0; |
| | | let rotateY = info.rotateY || 0; |
| | | |
| | | clone.name = info.no + "-sta"; |
| | | clone.position.x = 0 + positionX; |
| | | clone.position.y = 0 + positionY; |
| | | clone.position.z = 0 + positionZ; |