修改三维电子沙盘内外侧站台数据不全bug,修改外车站台漫游

This commit is contained in:
sunzhenyu 2020-09-01 11:17:29 +08:00
parent 4668783e72
commit 4a1e3d0aa7
3 changed files with 35 additions and 15 deletions

View File

@ -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));
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();

View File

@ -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<standsdata.length;i++){
for(let j=0;j<mapdata.stationStandList.length;j++){
if(standsdata[i].code == mapdata.stationStandList[j].stationCode){
standsdata[i].inside = mapdata.stationStandList[j].inside;
j = mapdata.stationStandList.length;
}
}
}
}
assetloader.setModelListOver(JSON.parse(netdata.assets).sceneAssetList);
// assetloader.setmodellistnew(netdata.assets);

View File

@ -101,7 +101,7 @@ export function StationStandListN() {
}
}
// console.log(newstationmesh);
if(mode){
if(mode == "02"){
let textgeometry = new THREE.PlaneBufferGeometry( 65, 90, 1 );
@ -153,6 +153,7 @@ export function StationStandListN() {
}
}
for(let i=0;i<standsdata.length;i++){
let newstationstand = new StationStandModel(standsdata[i]);
if(standsdata[i].code != "Station96090"){
@ -169,16 +170,18 @@ export function StationStandListN() {
newstationstand.direction2.name = standsdata[i].direction2.name;
newstationstand.direction2.screenDoorOpenStatus = "01";
let newstationmesh = null;
if(standsdata[i].inside == true){
if(standsdata[i].inside == undefined){
newstationmesh = selectmesh1.clone(true);
}else if(standsdata[i].inside == true){
newstationmesh = selectmesh1.clone(true);
}else{
newstationmesh = selectmesh2.clone(true);
}
// console.log(standsdata[i].name);
// console.log(standsdata[i].code);
// console.log("==================");
newstationmesh.code = standsdata[i].code;
newstationmesh.name = standsdata[i].code;
newstationmesh.inside = standsdata[i].inside;
newstationmesh.position.x = standsdata[i].position.x;
newstationmesh.position.y = standsdata[i].position.y;
newstationmesh.position.z = standsdata[i].position.z;