隐藏三维轨迹线
This commit is contained in:
parent
006f93f0d3
commit
330efdc434
@ -241,37 +241,37 @@ export function RailListN(){
|
||||
scope.sectionrail[sectioncode].lineright.closed = false;
|
||||
scope.sectionrail[sectioncode].lineright.name = sectioncode;
|
||||
|
||||
for(let n=0,nm=scope.sectionrail[sectioncode].lineleft.points.length;n<nm;n++){
|
||||
var geometry = new THREE.CircleGeometry( 0.05, 16 );
|
||||
var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
|
||||
var circle = new THREE.Mesh( geometry, material );
|
||||
// console.log(n);
|
||||
// console.log(scope.sectionrail[section[i].code].lineleft.points[n]);
|
||||
circle.position.x = scope.sectionrail[sectioncode].lineleft.points[n].x;
|
||||
circle.position.y = scope.sectionrail[sectioncode].lineleft.points[n].y;
|
||||
circle.position.z = scope.sectionrail[sectioncode].lineleft.points[n].z;
|
||||
circle.rotation.x = -Math.PI/2;
|
||||
scene.add( circle );
|
||||
}
|
||||
// scope.sectionrail[section[i].code].lineright.tension = 0.11;
|
||||
var points = scope.sectionrail[sectioncode].lineleft.getPoints( 50 );
|
||||
var geometry = new THREE.BufferGeometry().setFromPoints( points );
|
||||
var material;
|
||||
if(scope.sectionrail[sectioncode].type == "a"){
|
||||
material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
|
||||
}
|
||||
if(scope.sectionrail[sectioncode].type == "b"){
|
||||
material = new THREE.LineBasicMaterial( { color : 0x00ff00 } );
|
||||
}
|
||||
if(scope.sectionrail[sectioncode].type == "c"){
|
||||
material = new THREE.LineBasicMaterial( { color : 0x0000ff } );
|
||||
}
|
||||
|
||||
|
||||
// Create the final object to add to the scene
|
||||
var curveObject = new THREE.Line( geometry, material );
|
||||
|
||||
curveObject.position.y = Math.random();
|
||||
scene.add(curveObject);
|
||||
// for(let n=0,nm=scope.sectionrail[sectioncode].lineleft.points.length;n<nm;n++){
|
||||
// var geometry = new THREE.CircleGeometry( 0.05, 16 );
|
||||
// var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
|
||||
// var circle = new THREE.Mesh( geometry, material );
|
||||
// // console.log(n);
|
||||
// // console.log(scope.sectionrail[section[i].code].lineleft.points[n]);
|
||||
// circle.position.x = scope.sectionrail[sectioncode].lineleft.points[n].x;
|
||||
// circle.position.y = scope.sectionrail[sectioncode].lineleft.points[n].y;
|
||||
// circle.position.z = scope.sectionrail[sectioncode].lineleft.points[n].z;
|
||||
// circle.rotation.x = -Math.PI/2;
|
||||
// scene.add( circle );
|
||||
// }
|
||||
// // scope.sectionrail[section[i].code].lineright.tension = 0.11;
|
||||
// var points = scope.sectionrail[sectioncode].lineleft.getPoints( 50 );
|
||||
// var geometry = new THREE.BufferGeometry().setFromPoints( points );
|
||||
// var material;
|
||||
// if(scope.sectionrail[sectioncode].type == "a"){
|
||||
// material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
|
||||
// }
|
||||
// if(scope.sectionrail[sectioncode].type == "b"){
|
||||
// material = new THREE.LineBasicMaterial( { color : 0x00ff00 } );
|
||||
// }
|
||||
// if(scope.sectionrail[sectioncode].type == "c"){
|
||||
// material = new THREE.LineBasicMaterial( { color : 0x0000ff } );
|
||||
// }
|
||||
//
|
||||
//
|
||||
// // Create the final object to add to the scene
|
||||
// var curveObject = new THREE.Line( geometry, material );
|
||||
//
|
||||
// curveObject.position.y = Math.random();
|
||||
// scene.add(curveObject);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user