注释
This commit is contained in:
parent
8f7641caad
commit
c51bb4c7c6
@ -217,7 +217,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation) {
|
|||||||
renderercctv.render(scene,cameracctv);
|
renderercctv.render(scene,cameracctv);
|
||||||
}
|
}
|
||||||
//相机按键位移
|
//相机按键位移
|
||||||
controls3.update();
|
// controls3.update();
|
||||||
delta = clock.getDelta();
|
delta = clock.getDelta();
|
||||||
for (let i=mixers.length-1; i>=0; i--) {
|
for (let i=mixers.length-1; i>=0; i--) {
|
||||||
mixers[i].update( delta );
|
mixers[i].update( delta );
|
||||||
|
@ -341,7 +341,7 @@ export function Jl3dDriving(updatemmi,sound,translation) {
|
|||||||
for (let tl=0; tl<6; tl++) {
|
for (let tl=0; tl<6; tl++) {
|
||||||
trainlisttest.list[code].children[tl].position.z = point.z;
|
trainlisttest.list[code].children[tl].position.z = point.z;
|
||||||
}
|
}
|
||||||
|
console.log(data.body[i]);
|
||||||
if(data.body[i].targetStation){
|
if(data.body[i].targetStation){
|
||||||
trainlisttest.list[code].stopstation = data.body[i].targetStation;
|
trainlisttest.list[code].stopstation = data.body[i].targetStation;
|
||||||
trainlisttest.list[code].pc = data.body[i].targetLinkPercent/rails.stops[data.body[i].targetStation].direct2.percent;
|
trainlisttest.list[code].pc = data.body[i].targetLinkPercent/rails.stops[data.body[i].targetStation].direct2.percent;
|
||||||
@ -368,6 +368,7 @@ export function Jl3dDriving(updatemmi,sound,translation) {
|
|||||||
// console.log("0000000000000000");
|
// console.log("0000000000000000");
|
||||||
// console.log(data.body[i].linkOffsetPercent);
|
// console.log(data.body[i].linkOffsetPercent);
|
||||||
// }
|
// }
|
||||||
|
console.log(data.body[i]);
|
||||||
if(data.body[i].targetStation){
|
if(data.body[i].targetStation){
|
||||||
trainlisttest.list[code].stopstation = data.body[i].targetStation;
|
trainlisttest.list[code].stopstation = data.body[i].targetStation;
|
||||||
trainlisttest.list[code].pc = data.body[i].targetLinkPercent/rails.stops[data.body[i].targetStation].direct1.percent;
|
trainlisttest.list[code].pc = data.body[i].targetLinkPercent/rails.stops[data.body[i].targetStation].direct1.percent;
|
||||||
|
@ -250,35 +250,35 @@ export function RailList(){
|
|||||||
for(let j=0,lenj=linklist.length;j<lenj;j++){
|
for(let j=0,lenj=linklist.length;j<lenj;j++){
|
||||||
if(standsections[i].linkCode == linklist[j].code){
|
if(standsections[i].linkCode == linklist[j].code){
|
||||||
|
|
||||||
let geometry = new THREE.CircleGeometry( 2, 16 );
|
// let geometry = new THREE.CircleGeometry( 2, 16 );
|
||||||
let material = new THREE.MeshBasicMaterial( { color: 0x00ffff } );
|
// let material = new THREE.MeshBasicMaterial( { color: 0x00ffff } );
|
||||||
|
|
||||||
if(standsdata[k].direction1.code == standsections[i].relStandCode){
|
if(standsdata[k].direction1.code == standsections[i].relStandCode){
|
||||||
stop.code = standsdata[k].code;
|
stop.code = standsdata[k].code;
|
||||||
let circle1 = new THREE.Mesh( geometry, material );
|
// let circle1 = new THREE.Mesh( geometry, material );
|
||||||
let circle2 = new THREE.Mesh( geometry, material );
|
// let circle2 = new THREE.Mesh( geometry, material );
|
||||||
let num = scope.linkrail[linklist[j].code].lineleft.points.length-1;
|
let num = scope.linkrail[linklist[j].code].lineleft.points.length-1;
|
||||||
let lengthfacts = scope.linkrail[linklist[j].code].lineleft.points[num].x - scope.linkrail[linklist[j].code].lineleft.points[0].x;
|
let lengthfacts = scope.linkrail[linklist[j].code].lineleft.points[num].x - scope.linkrail[linklist[j].code].lineleft.points[0].x;
|
||||||
let directoffset1 = standsdata[k].position.x-64-scope.linkrail[linklist[j].code].lineleft.points[0].x;
|
let directoffset1 = standsdata[k].position.x-64-scope.linkrail[linklist[j].code].lineleft.points[0].x;
|
||||||
stop.direct1.percent = directoffset1/lengthfacts;
|
stop.direct1.percent = directoffset1/lengthfacts;
|
||||||
|
|
||||||
circle1.position.x = standsdata[k].position.x+64;
|
// circle1.position.x = standsdata[k].position.x+64;
|
||||||
circle1.position.y = 5;
|
// circle1.position.y = 5;
|
||||||
circle1.position.z = scope.linkrail[linklist[j].code].points[0].z;
|
// circle1.position.z = scope.linkrail[linklist[j].code].points[0].z;
|
||||||
circle1.rotation.x = -Math.PI/2;
|
// circle1.rotation.x = -Math.PI/2;
|
||||||
|
//
|
||||||
circle2.position.x = standsdata[k].position.x-64;
|
// circle2.position.x = standsdata[k].position.x-64;
|
||||||
circle2.position.y = 5;
|
// circle2.position.y = 5;
|
||||||
circle2.position.z = scope.linkrail[linklist[j].code].points[0].z;
|
// circle2.position.z = scope.linkrail[linklist[j].code].points[0].z;
|
||||||
circle2.rotation.x = -Math.PI/2;
|
// circle2.rotation.x = -Math.PI/2;
|
||||||
scene.add( circle1 );
|
// scene.add( circle1 );
|
||||||
scene.add( circle2 );
|
// scene.add( circle2 );
|
||||||
// console.log(stop);
|
// console.log(stop);
|
||||||
}
|
}
|
||||||
if(standsdata[k].direction2.code == standsections[i].relStandCode){
|
if(standsdata[k].direction2.code == standsections[i].relStandCode){
|
||||||
stop.code = standsdata[k].code;
|
stop.code = standsdata[k].code;
|
||||||
let circle1 = new THREE.Mesh( geometry, material );
|
// let circle1 = new THREE.Mesh( geometry, material );
|
||||||
let circle2 = new THREE.Mesh( geometry, material );
|
// let circle2 = new THREE.Mesh( geometry, material );
|
||||||
let num = scope.linkrail[linklist[j].code].lineleft.points.length-1;
|
let num = scope.linkrail[linklist[j].code].lineleft.points.length-1;
|
||||||
let lengthfacts = scope.linkrail[linklist[j].code].lineleft.points[num].x - scope.linkrail[linklist[j].code].lineleft.points[0].x;
|
let lengthfacts = scope.linkrail[linklist[j].code].lineleft.points[num].x - scope.linkrail[linklist[j].code].lineleft.points[0].x;
|
||||||
|
|
||||||
@ -309,18 +309,18 @@ export function RailList(){
|
|||||||
// console.log("........................");
|
// console.log("........................");
|
||||||
// console.log(standsdata[k].position.x+64);
|
// console.log(standsdata[k].position.x+64);
|
||||||
// console.log(scope.linkrail[linklist[j].code].lineleft.getPointAt(stop.direct2.percent).x);
|
// console.log(scope.linkrail[linklist[j].code].lineleft.getPointAt(stop.direct2.percent).x);
|
||||||
circle1.position.x = standsdata[k].position.x+64;
|
// circle1.position.x = standsdata[k].position.x+64;
|
||||||
circle1.position.y = 5;
|
// circle1.position.y = 5;
|
||||||
circle1.position.z = scope.linkrail[linklist[j].code].points[0].z;
|
// circle1.position.z = scope.linkrail[linklist[j].code].points[0].z;
|
||||||
circle1.rotation.x = -Math.PI/2;
|
// circle1.rotation.x = -Math.PI/2;
|
||||||
|
// //
|
||||||
|
// circle2.position.x = standsdata[k].position.x-64;
|
||||||
|
// circle2.position.y = 5;
|
||||||
|
// circle2.position.z = scope.linkrail[linklist[j].code].points[0].z;
|
||||||
|
// circle2.rotation.x = -Math.PI/2;
|
||||||
//
|
//
|
||||||
circle2.position.x = standsdata[k].position.x-64;
|
// scene.add( circle1 );
|
||||||
circle2.position.y = 5;
|
// scene.add( circle2 );
|
||||||
circle2.position.z = scope.linkrail[linklist[j].code].points[0].z;
|
|
||||||
circle2.rotation.x = -Math.PI/2;
|
|
||||||
|
|
||||||
scene.add( circle1 );
|
|
||||||
scene.add( circle2 );
|
|
||||||
// console.log(stop);
|
// console.log(stop);
|
||||||
}
|
}
|
||||||
if(stop.direct1.percent != null && stop.direct2.percent != null){
|
if(stop.direct1.percent != null && stop.direct2.percent != null){
|
||||||
|
Loading…
Reference in New Issue
Block a user