diff --git a/src/jlmap3d/edit/jlmap3dedit.js b/src/jlmap3d/edit/jlmap3dedit.js index 1359c1fa8..37f4c11c4 100644 --- a/src/jlmap3d/edit/jlmap3dedit.js +++ b/src/jlmap3d/edit/jlmap3dedit.js @@ -310,19 +310,26 @@ export function JLmap3dEdit(dom, data, mapid) { let downStandTrack = scope.mapdata.sectionlist.sections.datalist[changeData.stands[changeData.stands.length-1].section]; console.log(scope.mapdata.sectionlist.sections); - console.log(topStandTrack); - console.log(downStandTrack); + console.log(topStandTrack.mesh.railpoint[0].x); + console.log(topStandTrack.mesh.railpoint[2].x); + console.log(downStandTrack.mesh.railpoint[0].x); + console.log(downStandTrack.mesh.railpoint[2].x); - let rightpos = topStandTrack.rightStopPercent*(topStandTrack.railpoint[2].x -topStandTrack.railpoint[0].x)+topStandTrack.railpoint[0].x; - let leftpos = downStandTrack.leftStopPercent*(downStandTrack.railpoint[2].x -downStandTrack.railpoint[0].x)+downStandTrack.railpoint[0].x; + let rightpos = topStandTrack.leftStopPercent*(topStandTrack.mesh.railpoint[2].x -topStandTrack.mesh.railpoint[0].x)+topStandTrack.mesh.railpoint[0].x; + let leftpos = downStandTrack.rightStopPercent*(downStandTrack.mesh.railpoint[2].x -downStandTrack.mesh.railpoint[0].x)+downStandTrack.mesh.railpoint[0].x; - let rightX = changeData.mesh.position.x-63.2 - rightpos; - let leftX = changeData.mesh.position.x+63.2 - leftpos; - - topStandTrack.mesh.position.x = topStandTrack.mesh.position.x + rightX; + let rightX = changeData.mesh.position.x-63.4 - rightpos; + let leftX = changeData.mesh.position.x+63.4 - leftpos; + console.log("----------------------------"); + console.log(rightpos); + console.log(leftpos); + console.log("----------------------------"); + console.log(rightX); + console.log(leftX); + topStandTrack.mesh.position.x = topStandTrack.mesh.position.z + rightX; downStandTrack.mesh.position.x = downStandTrack.mesh.position.x + leftX; - - // changeStation.position.set(topStandTrack.railpoint[0].x+(topStandTrack.leftStopPointOffset+topStandTrack.rightStopPointOffset)/2,topStandTrack.railpoint[1].y,(topStandTrack.railpoint[1].z+downStandTrack.railpoint[1].z)/2); + // + // // changeStation.position.set(topStandTrack.railpoint[0].x+(topStandTrack.leftStopPointOffset+topStandTrack.rightStopPointOffset)/2,topStandTrack.railpoint[1].y,(topStandTrack.railpoint[1].z+downStandTrack.railpoint[1].z)/2); topStandTrack.mesh.railpoint[0].x = topStandTrack.mesh.railpoint[0].x+rightX; topStandTrack.mesh.railpoint[2].x = topStandTrack.mesh.railpoint[2].x+rightX; diff --git a/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnectNew.js b/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnectNew.js index d5116bccd..c74e4166e 100644 --- a/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnectNew.js +++ b/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnectNew.js @@ -995,29 +995,29 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri function signalupdate(data) { code = data.code; if(data.red == 1){ - signallist.list[code].mesh.getObjectByName("red").material.map = materials[0]; + signallist.list[code].mesh.getObjectByName("red").material.map = materials["red"]; signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true; }else{ - signallist.list[code].mesh.getObjectByName("red").material.map = materials[3]; + signallist.list[code].mesh.getObjectByName("red").material.map = materials["black"]; signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true; } if(data.yellow == 1){ - signallist.list[code].mesh.getObjectByName("yellow").material.map = materials[1]; + signallist.list[code].mesh.getObjectByName("yellow").material.map = materials["yellow"]; signallist.list[code].mesh.getObjectByName("yellow").material.map.needsUpdate = true; }else{ - signallist.list[code].mesh.getObjectByName("yellow").material.map = materials[3]; + signallist.list[code].mesh.getObjectByName("yellow").material.map = materials["black"]; signallist.list[code].mesh.getObjectByName("yellow").material.map.needsUpdate = true; } if(data.green == 1){ - signallist.list[code].mesh.getObjectByName("green").material.map = materials[2]; + signallist.list[code].mesh.getObjectByName("green").material.map = materials["green"]; signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true; }else{ - signallist.list[code].mesh.getObjectByName("green").material.map = materials[3]; + signallist.list[code].mesh.getObjectByName("green").material.map = materials["black"]; signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true; } diff --git a/src/jlmap3d/jl3dsimulation/connect/Jlmap3dSubscribeNew.js b/src/jlmap3d/jl3dsimulation/connect/Jlmap3dSubscribeNew.js index 4f0bbb622..3f5b1d6f3 100644 --- a/src/jlmap3d/jl3dsimulation/connect/Jlmap3dSubscribeNew.js +++ b/src/jlmap3d/jl3dsimulation/connect/Jlmap3dSubscribeNew.js @@ -798,29 +798,29 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) { code = data.code; if(signallist.list[code]){ if(data.red == 1){ - signallist.list[code].mesh.getObjectByName("red").material.map = materials[0]; + signallist.list[code].mesh.getObjectByName("red").material.map = materials["red"]; signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true; }else{ - signallist.list[code].mesh.getObjectByName("red").material.map = materials[3]; + signallist.list[code].mesh.getObjectByName("red").material.map = materials["black"]; signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true; } if(data.yellow == 1){ - signallist.list[code].mesh.getObjectByName("yellow").material.map = materials[1]; + signallist.list[code].mesh.getObjectByName("yellow").material.map = materials["yellow"]; signallist.list[code].mesh.getObjectByName("yellow").material.map.needsUpdate = true; }else{ - signallist.list[code].mesh.getObjectByName("yellow").material.map = materials[3]; + signallist.list[code].mesh.getObjectByName("yellow").material.map = materials["black"]; signallist.list[code].mesh.getObjectByName("yellow").material.map.needsUpdate = true; } if(data.green == 1){ - signallist.list[code].mesh.getObjectByName("green").material.map = materials[2]; + signallist.list[code].mesh.getObjectByName("green").material.map = materials["green"]; signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true; }else{ - signallist.list[code].mesh.getObjectByName("green").material.map = materials[3]; + signallist.list[code].mesh.getObjectByName("green").material.map = materials["black"]; signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true; } diff --git a/src/jlmap3d/main/loaders/Materialload.js b/src/jlmap3d/main/loaders/Materialload.js index 9f41014e1..21eccc0db 100644 --- a/src/jlmap3d/main/loaders/Materialload.js +++ b/src/jlmap3d/main/loaders/Materialload.js @@ -33,7 +33,7 @@ function settexture(materiallist,name,textureurl){ // onLoad回调 function ( texture ) { texture.name = name; - materiallist.push(texture); + materiallist[name] = texture; }, // 目前暂不支持onProgress的回调 diff --git a/src/views/jlmap3d/drive/drivecontrol/centerpane.vue b/src/views/jlmap3d/drive/drivecontrol/centerpane.vue index 6e465e7da..2ac2b97a1 100644 --- a/src/views/jlmap3d/drive/drivecontrol/centerpane.vue +++ b/src/views/jlmap3d/drive/drivecontrol/centerpane.vue @@ -320,8 +320,8 @@ if(mx46){ if(angle<63 && angle>46){ if(this.touchstate != "Drive"){ @@ -330,7 +330,7 @@ gear:"Drive" }; trainSimulationGear(this.group,data).then(netdata => { - console.log(netdata); + // console.log(netdata); if(netdata.code == "200"){ this.toutransform = "rotate(140deg)"; this.touchstate = "Drive"; diff --git a/src/views/jlmap3d/drive/drivecontrol/drivecontrol.vue b/src/views/jlmap3d/drive/drivecontrol/drivecontrol.vue index 97b21c6ba..87d406f07 100644 --- a/src/views/jlmap3d/drive/drivecontrol/drivecontrol.vue +++ b/src/views/jlmap3d/drive/drivecontrol/drivecontrol.vue @@ -141,7 +141,7 @@ import axios from 'axios'; methods: { changeTrainSelect(mode){ if(mode == "isTraining"){ - this.isTraining = false; + // this.isTraining = false; } }, currentsel(selVal){ diff --git a/src/views/jlmap3d/drive/sceneview/mmiview.vue b/src/views/jlmap3d/drive/sceneview/mmiview.vue index 04c0a9128..af27b5c74 100644 --- a/src/views/jlmap3d/drive/sceneview/mmiview.vue +++ b/src/views/jlmap3d/drive/sceneview/mmiview.vue @@ -160,7 +160,7 @@ export default { } }, mounted() { - // window.updatemmic1 = this.updatemmic1; + window.updatemmic1 = this.updatemmic1; this.init(); }, beforeDestroy() { @@ -215,7 +215,6 @@ export default { }, updatetrainstatus(newdata){ - // console.log(newdata); if(typeof(newdata.eb) != "undefined"){ this.updateEbStatus(newdata.eb); @@ -249,7 +248,6 @@ export default { if(newdata.jump){ } - console.log(newdata.parking); if(newdata.parking != undefined){ this.m4parking = newdata.parking; this.updateM4(newdata); @@ -269,7 +267,9 @@ export default { this.tiaotinghold = newdata.hold; this.updateTiaoting(newdata); } - + if(newdata.tow != undefined){ + updatemmic1(newdata.tow); + } this.updatemmidoormode(newdata.leftDoorCanClose,newdata.rightDoorCanClose); }, @@ -313,7 +313,7 @@ export default { } }else{ this.nowspeed = parseInt(speed); - this.updatemmic1(this.nowspeed); + if(this.mmimodel.updatezz){ this.mmimodel.updatezz(speed); } @@ -343,7 +343,7 @@ export default { }, updateM4(newdata){ - console.log(newdata ); + if(newdata.parking != undefined){ if(newdata.parking == true){ this.m4image = this.images.m4['in']; @@ -360,7 +360,7 @@ export default { } }, updateTiaoting(newdata){ - console.log(newdata); + if(newdata.jump != undefined){ if(newdata.jump == true){ this.tiaotingimage = this.images.n['tiaoting']; @@ -548,25 +548,27 @@ export default { this.malen = +parseInt(len)/2*10+"px"; } }, - updatemmic1(nowspeed){ - if(this.nowspeed != 0 ){ - this.newc1state = 'duoxing'; - }else{ - this.newc1state = 'none'; + updatemmic1(tow){ + if(tow == "1"){ + this.c1image = this.images.c1["qianyin"]; } - if(nowspeed>this.oldspeed){ - - this.newc1state = 'qianyin'; - }else if(nowspeed