diff --git a/src/jlmap3d/edit/Jlmap3ddata.js b/src/jlmap3d/edit/Jlmap3ddata.js index 1584d214f..d5971cd96 100644 --- a/src/jlmap3d/edit/Jlmap3ddata.js +++ b/src/jlmap3d/edit/Jlmap3ddata.js @@ -120,7 +120,7 @@ export function Jlmap3ddata(mapid,scope){ } function init3d(mapid,netdata){ - console.log(netdata) + // console.log(netdata) getMapDetail(mapid).then(data => { jlmap3ddata.id = netdata.id; jlmap3ddata.mapId = mapid; @@ -141,7 +141,7 @@ export function Jlmap3ddata(mapid,scope){ let switchdata = JSON.parse(netdata.switchs); let signaldata = JSON.parse(netdata.signals); let standsdata = JSON.parse(netdata.stands); - console.log(mapdata); + // console.log(mapdata); assetloader.setmodellist(netdata.assets); assetloader.assetpromise(scene) .then(function(data){ diff --git a/src/jlmap3d/edit/editmodel/SectionList.js b/src/jlmap3d/edit/editmodel/SectionList.js index 369528b35..ceb419e3d 100644 --- a/src/jlmap3d/edit/editmodel/SectionList.js +++ b/src/jlmap3d/edit/editmodel/SectionList.js @@ -48,7 +48,7 @@ export function SectionList() { } } buildsuidao(linkdata,scope.sections,assetloader,scene); - console.log(scope.sections.datalist); + // console.log(scope.sections.datalist); //定义区分道岔组 let switchlist = []; //遍历道岔数据 @@ -105,7 +105,7 @@ export function SectionList() { } } scope.switchs.datalist = switchlist; - console.log(switchlist); + // console.log(switchlist); //道岔贴图 let switchmesh1; let switchmesh2; @@ -142,9 +142,9 @@ export function SectionList() { let switchposz = sectionA.position.z; let switchposx; - if(switchlist[i].code == "Switch_135_0.16369"){ - console.log(switchlist[i]); - } + // if(switchlist[i].code == "Switch_135_0.16369"){ + // console.log(switchlist[i]); + // } if(switchlist[i].pa[0].x>switchlist[i].pb[0].x){ if(((switchlist[i].pc[0].y+switchlist[i].pc[1].y)/2) < switchlist[i].pa[0].y){ if(((switchlist[i].pc[0].x+switchlist[i].pc[1].x)/2)>switchlist[i].pa[0].x){ @@ -270,7 +270,7 @@ export function SectionList() { this.loadpromise = function(jlmap3ddata,assetloader,sectiondata,switchdata,scene){ return new Promise(function(resolve, reject){ - console.log(sectiondata); + // console.log(sectiondata); scene.add(scope.sectiongroup); scene.add(scope.switchgroup); let linkdata = jlmap3ddata.linklist; diff --git a/src/jlmap3d/jl3ddrive/moveupdate/UpdateTrain.js b/src/jlmap3d/jl3ddrive/moveupdate/UpdateTrain.js index d163ad90b..3ba5b38eb 100644 --- a/src/jlmap3d/jl3ddrive/moveupdate/UpdateTrain.js +++ b/src/jlmap3d/jl3ddrive/moveupdate/UpdateTrain.js @@ -12,6 +12,7 @@ export function UpdateTrain(camera,traindata,control){ if(trainmodel.speeds > 0 && trainmodel.speeds){ let speed = null; + // console.log(traindata.group.children[0].progress); if(traindata.group.children[0].progress >=0&&traindata.group.children[0].progress<=1){ let movecurve = trainmodel.curve; diff --git a/src/jlmap3d/main/loaders/AssetLoader.js b/src/jlmap3d/main/loaders/AssetLoader.js index a6bc0a03e..7911ece4d 100644 --- a/src/jlmap3d/main/loaders/AssetLoader.js +++ b/src/jlmap3d/main/loaders/AssetLoader.js @@ -34,7 +34,7 @@ let defaultstation = { deviceType:"stand", type:"num4", picUrl:"", - assetUrl:"../../static/model/station/fuzhou.FBX" + assetUrl:modelurl+"/models/station/fuzhou/fuzhou.FBX" } //modelurl+"/models/station/fuzhou/fuzhou.FBX" //https://test.joylink.club/oss/models/station/fuzhou/fuzhou.FBX @@ -65,11 +65,12 @@ let defaultsuidao = { deviceType:"suidao", type:"suidao", picUrl:"", - assetUrl:"../../static/model/suidao/suidao.FBX" + assetUrl:modelurl+"/models/suidao/suidao.FBX" } +//modelurl+"/models/suidao/suidao.FBX" //https://test.joylink.club/oss/models/suidao/suidao.FBX //https://joylink.club/oss/models/suidao/suidao.FBX -//../../static/model/ +//../../static/model/suidao/suidao.FBX let defaultautorail = { id:"100", diff --git a/src/jlmap3d/main/model/RailList.js b/src/jlmap3d/main/model/RailList.js index 9df2773d1..13ae93da6 100644 --- a/src/jlmap3d/main/model/RailList.js +++ b/src/jlmap3d/main/model/RailList.js @@ -55,9 +55,20 @@ export function RailList(){ for(let i=0;i0){ @@ -69,9 +80,10 @@ export function RailList(){ scope.linkrail[linkdata[i].code].type = 1; if(scope.linkrail[linkdata[i].code].lswitch){ let switchpoint = scope.switchrail[scope.linkrail[linkdata[i].code].lswitch].position; + scope.linkrail[linkdata[i].code].points.push(new THREE.Vector3(switchpoint.x,0,switchpoint.z)); scope.linkrail[linkdata[i].code].points.push(new THREE.Vector3(switchpoint.x+1.5,0,switchpoint.z)); scope.linkrail[linkdata[i].code].points.push(new THREE.Vector3(switchpoint.x+2,0,switchpoint.z)); - scope.linkrail[linkdata[i].code].points.push(new THREE.Vector3(switchpoint.x+5,0,switchpoint.z-0.05)); + scope.linkrail[linkdata[i].code].points.push(new THREE.Vector3(switchpoint.x+6,0,switchpoint.z-0.06)); } scope.linkrail[linkdata[i].code].points.push(testline.getPointAt(0.12)); @@ -81,9 +93,10 @@ export function RailList(){ if(scope.linkrail[linkdata[i].code].rswitch){ let switchpoint = scope.switchrail[scope.linkrail[linkdata[i].code].rswitch].position; - scope.linkrail[linkdata[i].code].points.push(new THREE.Vector3(switchpoint.x-5,0,switchpoint.z+0.05)); + scope.linkrail[linkdata[i].code].points.push(new THREE.Vector3(switchpoint.x-6,0,switchpoint.z+0.06)); scope.linkrail[linkdata[i].code].points.push(new THREE.Vector3(switchpoint.x-2,0,switchpoint.z)); scope.linkrail[linkdata[i].code].points.push(new THREE.Vector3(switchpoint.x-1.5,0,switchpoint.z)); + scope.linkrail[linkdata[i].code].points.push(new THREE.Vector3(switchpoint.x,0,switchpoint.z)); } }else{ @@ -94,9 +107,10 @@ export function RailList(){ scope.linkrail[linkdata[i].code].type = 2; if(scope.linkrail[linkdata[i].code].lswitch){ let switchpoint = scope.switchrail[scope.linkrail[linkdata[i].code].lswitch].position; + scope.linkrail[linkdata[i].code].points.push(new THREE.Vector3(switchpoint.x,0,switchpoint.z)); scope.linkrail[linkdata[i].code].points.push(new THREE.Vector3(switchpoint.x+1.5,0,switchpoint.z)); scope.linkrail[linkdata[i].code].points.push(new THREE.Vector3(switchpoint.x+2,0,switchpoint.z)); - scope.linkrail[linkdata[i].code].points.push(new THREE.Vector3(switchpoint.x+5,0,switchpoint.z+0.05)); + scope.linkrail[linkdata[i].code].points.push(new THREE.Vector3(switchpoint.x+6,0,switchpoint.z+0.06)); } scope.linkrail[linkdata[i].code].points.push(testline.getPointAt(0.12)); @@ -106,9 +120,10 @@ export function RailList(){ if(scope.linkrail[linkdata[i].code].rswitch){ let switchpoint = scope.switchrail[scope.linkrail[linkdata[i].code].rswitch].position; - scope.linkrail[linkdata[i].code].points.push(new THREE.Vector3(switchpoint.x-5,0,switchpoint.z-0.05)); + scope.linkrail[linkdata[i].code].points.push(new THREE.Vector3(switchpoint.x-6,0,switchpoint.z-0.06)); scope.linkrail[linkdata[i].code].points.push(new THREE.Vector3(switchpoint.x-2,0,switchpoint.z)); scope.linkrail[linkdata[i].code].points.push(new THREE.Vector3(switchpoint.x-1.5,0,switchpoint.z)); + scope.linkrail[linkdata[i].code].points.push(new THREE.Vector3(switchpoint.x,0,switchpoint.z)); } } } @@ -140,46 +155,30 @@ export function RailList(){ } if(scope.linkrail[switchdata[i].blink].lp.x < switchdata[i].position.x){ - scope.linkrail[switchdata[i].blink].points.push(new THREE.Vector3(switchdata[i].position.x-2,switchdata[i].position.y,switchdata[i].position.z)); - scope.linkrail[switchdata[i].blink].points.push(new THREE.Vector3(switchdata[i].position.x,switchdata[i].position.y,switchdata[i].position.z)); - scope.linkrail[switchdata[i].blink].points.push(new THREE.Vector3(switchdata[i].position.x+1.5,switchdata[i].position.y,switchdata[i].position.z)); - if(scope.linkrail[switchdata[i].alink].type == 1){ - }else if(scope.linkrail[switchdata[i].alink].type == 2){ - }else{ - scope.linkrail[switchdata[i].blink].points.push(new THREE.Vector3(scope.linkrail[switchdata[i].alink].lp.x+1.5,0,scope.linkrail[switchdata[i].alink].lp.z)); - } + // scope.linkrail[switchdata[i].blink].points.push(new THREE.Vector3(switchdata[i].position.x-2,switchdata[i].position.y,switchdata[i].position.z)); + // scope.linkrail[switchdata[i].blink].points.push(new THREE.Vector3(switchdata[i].position.x,switchdata[i].position.y,switchdata[i].position.z)); + // scope.linkrail[switchdata[i].blink].points.push(new THREE.Vector3(switchdata[i].position.x+1.5,switchdata[i].position.y,switchdata[i].position.z)); + // scope.switchrail[switchdata[i].code].directtype = "1"; }else{ - scope.linkrail[switchdata[i].blink].points.splice(0,0,new THREE.Vector3(switchdata[i].position.x+2,switchdata[i].position.y,switchdata[i].position.z)); - scope.linkrail[switchdata[i].blink].points.splice(0,0,new THREE.Vector3(switchdata[i].position.x,switchdata[i].position.y,switchdata[i].position.z)); - scope.linkrail[switchdata[i].blink].points.splice(0,0,new THREE.Vector3(switchdata[i].position.x-1.5,switchdata[i].position.y,switchdata[i].position.z)); - if(scope.linkrail[switchdata[i].alink].type == 1){ - }else if(scope.linkrail[switchdata[i].alink].type == 2){ - }else{ - scope.linkrail[switchdata[i].blink].points.splice(0,0,new THREE.Vector3(scope.linkrail[switchdata[i].alink].rp.x-1.5,0,scope.linkrail[switchdata[i].alink].rp.z)); - } + // scope.linkrail[switchdata[i].blink].points.splice(0,0,new THREE.Vector3(switchdata[i].position.x+2,switchdata[i].position.y,switchdata[i].position.z)); + // scope.linkrail[switchdata[i].blink].points.splice(0,0,new THREE.Vector3(switchdata[i].position.x,switchdata[i].position.y,switchdata[i].position.z)); + // scope.linkrail[switchdata[i].blink].points.splice(0,0,new THREE.Vector3(switchdata[i].position.x-1.5,switchdata[i].position.y,switchdata[i].position.z)); + // scope.switchrail[switchdata[i].code].directtype = "2"; } - // + if(scope.linkrail[switchdata[i].clink].lp.x < switchdata[i].position.x){ - // scope.linkrail[switchdata[i].clink].points.push(new THREE.Vector3(switchdata[i].position.x-3.5,switchdata[i].position.y,switchdata[i].position.z+0.02)); - scope.linkrail[switchdata[i].clink].points.push(new THREE.Vector3(switchdata[i].position.x,switchdata[i].position.y,switchdata[i].position.z)); - scope.linkrail[switchdata[i].clink].points.push(new THREE.Vector3(switchdata[i].position.x+1.5,switchdata[i].position.y,switchdata[i].position.z)); - if(scope.linkrail[switchdata[i].alink].type == 1){ - }else if(scope.linkrail[switchdata[i].alink].type == 2){ - }else{ - scope.linkrail[switchdata[i].clink].points.push(new THREE.Vector3(scope.linkrail[switchdata[i].alink].lp.x+1.5,0,scope.linkrail[switchdata[i].alink].lp.z)); - } + // // scope.linkrail[switchdata[i].clink].points.push(new THREE.Vector3(switchdata[i].position.x-3.5,switchdata[i].position.y,switchdata[i].position.z+0.02)); + // scope.linkrail[switchdata[i].clink].points.push(new THREE.Vector3(switchdata[i].position.x,switchdata[i].position.y,switchdata[i].position.z)); + // scope.linkrail[switchdata[i].clink].points.push(new THREE.Vector3(switchdata[i].position.x+1.5,switchdata[i].position.y,switchdata[i].position.z)); + // scope.switchrail[switchdata[i].code].directtype = "1"; }else{ - // scope.linkrail[switchdata[i].clink].points.splice(0,0,new THREE.Vector3(switchdata[i].position.x+3.5,switchdata[i].position.y,switchdata[i].position.z-0.02)); - scope.linkrail[switchdata[i].clink].points.splice(0,0,new THREE.Vector3(switchdata[i].position.x,switchdata[i].position.y,switchdata[i].position.z)); - scope.linkrail[switchdata[i].clink].points.splice(0,0,new THREE.Vector3(switchdata[i].position.x-1.5,switchdata[i].position.y,switchdata[i].position.z)); - if(scope.linkrail[switchdata[i].alink].type == 1){ - }else if(scope.linkrail[switchdata[i].alink].type == 2){ - }else{ - scope.linkrail[switchdata[i].clink].points.splice(0,0,new THREE.Vector3(scope.linkrail[switchdata[i].alink].rp.x-1.5,0,scope.linkrail[switchdata[i].alink].rp.z)); - } + // // scope.linkrail[switchdata[i].clink].points.splice(0,0,new THREE.Vector3(switchdata[i].position.x+3.5,switchdata[i].position.y,switchdata[i].position.z-0.02)); + // scope.linkrail[switchdata[i].clink].points.splice(0,0,new THREE.Vector3(switchdata[i].position.x,switchdata[i].position.y,switchdata[i].position.z)); + // scope.linkrail[switchdata[i].clink].points.splice(0,0,new THREE.Vector3(switchdata[i].position.x-1.5,switchdata[i].position.y,switchdata[i].position.z)); + // scope.switchrail[switchdata[i].code].directtype = "2"; } } diff --git a/static/model/station/fuzhou.FBX b/static/model/station/fuzhou.FBX index ce1316472..cd23cf167 100644 Binary files a/static/model/station/fuzhou.FBX and b/static/model/station/fuzhou.FBX differ diff --git a/static/model/station/fuzhounew.FBX b/static/model/station/fuzhou1.FBX similarity index 90% rename from static/model/station/fuzhounew.FBX rename to static/model/station/fuzhou1.FBX index cd23cf167..ce1316472 100644 Binary files a/static/model/station/fuzhounew.FBX and b/static/model/station/fuzhou1.FBX differ diff --git a/static/model/station/fuzhouold.FBX b/static/model/station/fuzhouold.FBX deleted file mode 100644 index a55566f7e..000000000 Binary files a/static/model/station/fuzhouold.FBX and /dev/null differ diff --git a/static/model/suidao/suidao.FBX b/static/model/suidao/suidao.FBX index 05c83952a..38c046af3 100644 Binary files a/static/model/suidao/suidao.FBX and b/static/model/suidao/suidao.FBX differ diff --git a/static/model/suidao/suidao1.FBX b/static/model/suidao/suidao1.FBX new file mode 100644 index 000000000..05c83952a Binary files /dev/null and b/static/model/suidao/suidao1.FBX differ diff --git a/static/model/suidao/suidaos.FBX b/static/model/suidao/suidaos.FBX deleted file mode 100644 index 047b18588..000000000 Binary files a/static/model/suidao/suidaos.FBX and /dev/null differ