Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
de1d8bb0db
@ -213,13 +213,8 @@ export function SectionList() {
|
||||
stopsections.push(realstopsection);
|
||||
}
|
||||
|
||||
|
||||
console.log(stopsections);
|
||||
|
||||
stopsections.sort(compare("posx"))
|
||||
|
||||
|
||||
|
||||
let leng1 = 0;
|
||||
let leng2 = 0;
|
||||
|
||||
@ -330,13 +325,12 @@ export function SectionList() {
|
||||
createsection(stopsections[0].reals[1].code,downstartpoint,stopsections[0].reals[1].code,34.8);
|
||||
|
||||
for(let i=1,leni=stopsections.length;i<leni;i++){
|
||||
console.log(stopsections[i]);
|
||||
|
||||
if(stopsections[i+1] ){
|
||||
for(let j=0,lenj=stopsections[i].reals.length;j<lenj;j++){
|
||||
|
||||
let topnextpoint = {};
|
||||
console.log(stopsections[i].reals[j].section.code);
|
||||
console.log(scope.sections.datalist[stopsections[i].reals[j].section.code]);
|
||||
|
||||
if(scope.sections.datalist[stopsections[i].reals[j].section.code].railpoint.length == 0){
|
||||
let
|
||||
topnextpoint = {
|
||||
@ -391,10 +385,9 @@ export function SectionList() {
|
||||
//根据站台区段创建站台位置 120停车点距离
|
||||
for(let j=0,lenj=stations.length;j<lenj;j++){
|
||||
// console.log(j);
|
||||
console.log(stations[j]);
|
||||
let direction1 = scope.sections.datalist[stations[j].stands[0].section];
|
||||
let direction2 = scope.sections.datalist[stations[j].stands[1].section];
|
||||
console.log(direction1);
|
||||
|
||||
let x = direction1.railpoint[0].x+direction1.leftStopPointOffset+60;
|
||||
let z = (direction1.railpoint[0].z+direction2.railpoint[0].z)/2;
|
||||
let mesh;
|
||||
@ -427,9 +420,7 @@ export function SectionList() {
|
||||
position.z = py;
|
||||
let len = scope.sections.datalist[start].lengthFact;
|
||||
let height = Math.random()/1000;
|
||||
console.log(origin);
|
||||
console.log(start);
|
||||
console.log("++++++++++++++++++");
|
||||
|
||||
scope.sections.datalist[start].railpoint = [
|
||||
new THREE.Vector3(position.x,height,position.z),
|
||||
new THREE.Vector3(position.x+0.5,height,position.z+0.0001),
|
||||
@ -504,7 +495,6 @@ export function SectionList() {
|
||||
// console.log(origin+"******************************");
|
||||
// console.log(start);
|
||||
// console.log(origin);
|
||||
console.log(scope.sections.datalist[start]);
|
||||
if(scope.sections.datalist[start].standTrack == true && start != origin){
|
||||
// console.log(start+"到达");
|
||||
// console.log("++++++++++++++++++++++++");
|
||||
|
@ -156,7 +156,7 @@ export function StationStandList() {
|
||||
section : jlmapstanddata[j].standTrackCode,
|
||||
inside : jlmapstanddata[j].inside,
|
||||
};
|
||||
|
||||
|
||||
stands.push(changestand);
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ this.loadpromise = function(sectionList,sectiondata,rails,scene,assetloader){
|
||||
texture.wrapS = texture.wrapT = THREE.RepeatWrapping;
|
||||
texture.anisotropy = 0;
|
||||
texture.magFilter = THREE.NearestFilter;
|
||||
texture.minFilter = THREE.NearestFilter;
|
||||
texture.minFilter = THREE.NearestFilter;
|
||||
texture.repeat.set( 1,1);
|
||||
|
||||
var selectmaterial = new THREE.MeshPhongMaterial( { map: texture,transparent:true,alphaTest:0.1 } );
|
||||
@ -108,13 +108,13 @@ this.loadpromise = function(sectionList,sectiondata,rails,scene,assetloader){
|
||||
if(Math.abs(newsection.railpoint[0].y-newsection.railpoint[2].y)>0.01){
|
||||
closedSpline = new THREE.CatmullRomCurve3( [
|
||||
new THREE.Vector3(newsection.railpoint[0].x,newsection.railpoint[0].y,newsection.railpoint[0].z),
|
||||
new THREE.Vector3(newsection.railpoint[1].x,newsection.railpoint[1].y,newsection.railpoint[1].z+0.001),
|
||||
new THREE.Vector3(newsection.railpoint[1].x,newsection.railpoint[1].y,newsection.railpoint[1].z+0.0001),
|
||||
new THREE.Vector3(newsection.railpoint[2].x,newsection.railpoint[2].y,newsection.railpoint[2].z)
|
||||
] );
|
||||
}else{
|
||||
closedSpline = new THREE.CatmullRomCurve3( [
|
||||
new THREE.Vector3(newsection.railpoint[0].x,newsection.railpoint[2].y,newsection.railpoint[0].z),
|
||||
new THREE.Vector3(newsection.railpoint[1].x,newsection.railpoint[2].y,newsection.railpoint[1].z+0.0015),
|
||||
new THREE.Vector3(newsection.railpoint[1].x,newsection.railpoint[2].y,newsection.railpoint[1].z+0.0001),
|
||||
new THREE.Vector3(newsection.railpoint[2].x,newsection.railpoint[2].y,newsection.railpoint[2].z)
|
||||
] );
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ export function TdtList() {
|
||||
stopSections[sectionData[i].code] = sectionData[i];
|
||||
}
|
||||
}
|
||||
|
||||
console.log(stationData);
|
||||
for(let k in stationData){
|
||||
for(let i=0;i<stationData[k].stands.length;i++){
|
||||
let newmesh = object.clone(true);
|
||||
@ -32,15 +32,15 @@ export function TdtList() {
|
||||
|
||||
materialList[stationData[k].stands[i].code] = newmesh;
|
||||
let sectionCode = stationData[k].stands[i].section;
|
||||
|
||||
let pos = stationData[k].mesh.position;
|
||||
if(stationData[k].stands[i].right == true){
|
||||
newmesh.rotation.y = -Math.PI/2;
|
||||
let pos = railData[sectionCode].lineleft.getPointAt(stopSections[sectionCode].rightStopPointOffset/stopSections[sectionCode].lengthFact);
|
||||
newmesh.position.set(pos.x+10,0,pos.z-1.8);
|
||||
newmesh.position.set(pos.x+75,0,pos.z+14.8);
|
||||
|
||||
}else{
|
||||
newmesh.rotation.y = Math.PI/2;
|
||||
let pos = railData[sectionCode].lineright.getPointAt(stopSections[sectionCode].rightStopPointOffset/stopSections[sectionCode].lengthFact);
|
||||
newmesh.position.set(pos.x-10,0,pos.z+1.8);
|
||||
newmesh.position.set(pos.x-75,0,pos.z-14.8);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user