From 4a1e3d0aa796b1418d05f976b4da07dde0fc1b64 Mon Sep 17 00:00:00 2001 From: sunzhenyu Date: Tue, 1 Sep 2020 11:17:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=89=E7=BB=B4=E7=94=B5?= =?UTF-8?q?=E5=AD=90=E6=B2=99=E7=9B=98=E5=86=85=E5=A4=96=E4=BE=A7=E7=AB=99?= =?UTF-8?q?=E5=8F=B0=E6=95=B0=E6=8D=AE=E4=B8=8D=E5=85=A8bug=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=96=E8=BD=A6=E7=AB=99=E5=8F=B0=E6=BC=AB?= =?UTF-8?q?=E6=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jlmap3d/jl3dsimulation/jlmap3d.js | 23 +++++++++++-------- src/jlmap3d/main/loaders/SimulationLoadNew.js | 14 ++++++++++- .../main/newmodel/StationStandListN.js | 13 +++++++---- 3 files changed, 35 insertions(+), 15 deletions(-) diff --git a/src/jlmap3d/jl3dsimulation/jlmap3d.js b/src/jlmap3d/jl3dsimulation/jlmap3d.js index 2db744224..192002b2d 100644 --- a/src/jlmap3d/jl3dsimulation/jlmap3d.js +++ b/src/jlmap3d/jl3dsimulation/jlmap3d.js @@ -420,7 +420,7 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) { } if(scope.raycasterswitch == "signal"){ - console.log(signallist); + let intersects = raycaster.intersectObjects( signallist.group.children,true); if(intersects[0]){ @@ -449,10 +449,7 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) { camerarail.progress = 0; let points = []; let stationp1 = stationstandlist.group.children[0].position; - let stationp2 = stationstandlist.group.children[20].position; - //全线漫游 - // points.push(new THREE.Vector3(stationp1.x-20,10,stationp1.z)); - // points.push(new THREE.Vector3(stationp2.x+20,10,stationp2.z)); + //站内漫游(晕) // points.push(new THREE.Vector3(stationp1.x-65,11,stationp1.z+15)); // points.push(new THREE.Vector3(stationp1.x,11,stationp1.z+15)); @@ -462,10 +459,18 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) { // points.push(new THREE.Vector3(stationp1.x+38,11,stationp1.z+2)); // points.push(new THREE.Vector3(stationp1.x+13,5,stationp1.z+2)); - points.push(new THREE.Vector3(stationp1.x-65,11,stationp1.z+12)); - points.push(new THREE.Vector3(stationp1.x+60,11,stationp1.z+12)); - points.push(new THREE.Vector3(stationp1.x+60,7,stationp1.z+12)); - points.push(new THREE.Vector3(stationp1.x-55,5,stationp1.z+12)); + if(stationstandlist.group.children[0].inside == false){ + points.push(new THREE.Vector3(stationp1.x-65,11,stationp1.z-26)); + points.push(new THREE.Vector3(stationp1.x+60,11,stationp1.z-26)); + points.push(new THREE.Vector3(stationp1.x+60,7,stationp1.z-26)); + points.push(new THREE.Vector3(stationp1.x-55,5,stationp1.z-26)); + }else{ + points.push(new THREE.Vector3(stationp1.x-65,11,stationp1.z+12)); + points.push(new THREE.Vector3(stationp1.x+60,11,stationp1.z+12)); + points.push(new THREE.Vector3(stationp1.x+60,7,stationp1.z+12)); + points.push(new THREE.Vector3(stationp1.x-55,5,stationp1.z+12)); + } + // points.push(new THREE.Vector3(stationp1.x+40,3,stationp1.z+15)); // controls.target = new THREE.Vector3(camera.position.x+1,camera.position.y,camera.position.z); // controls.update(); diff --git a/src/jlmap3d/main/loaders/SimulationLoadNew.js b/src/jlmap3d/main/loaders/SimulationLoadNew.js index 5f07c0902..487f5a3ed 100644 --- a/src/jlmap3d/main/loaders/SimulationLoadNew.js +++ b/src/jlmap3d/main/loaders/SimulationLoadNew.js @@ -46,6 +46,7 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce } function initnew3d(data,netdata){ + // console.log(JSON.parse(netdata.assets)); Materialload(scope,JSON.parse(netdata.assets).stationTextureList[0]); let mapdata = data; @@ -68,7 +69,18 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce let switchdata = JSON.parse(netdata.switchs); let signaldata = JSON.parse(netdata.signals); let standsdata = JSON.parse(netdata.stands); - let psddata = data.psdList; + let psddata = mapdata.psdList; + + if(standsdata[0].inside == undefined){ + for(let i=0;i