修改继电器模型H18的大小,更改继电器界面背景
This commit is contained in:
parent
2e0b0913d6
commit
1a4bc63382
@ -15,56 +15,52 @@ export function RailList(){
|
||||
|
||||
let section = mapdata.sectionlist.sections.datalist;
|
||||
|
||||
let n =0;
|
||||
let n =0;
|
||||
for(let i in section){
|
||||
|
||||
n = n+1;
|
||||
var geometry = new THREE.PlaneBufferGeometry( section[i].lengthFact, 1, 1 );
|
||||
var material = new THREE.MeshBasicMaterial( {color: 0xffff00, side: THREE.DoubleSide} );
|
||||
var plane = new THREE.Mesh( geometry, material );
|
||||
plane.position.x = section[i].mesh.position.x;
|
||||
plane.position.y = 2+Math.random()*10;
|
||||
plane.position.z = section[i].mesh.position.z;
|
||||
plane.rotation.x = -Math.PI/2;
|
||||
plane.rotation.z = section[i].mesh.rotation._z;
|
||||
var geometry = new THREE.PlaneBufferGeometry( section[i].lengthFact, 1, 1 );
|
||||
var material = new THREE.MeshBasicMaterial( {color: 0xffff00, side: THREE.DoubleSide} );
|
||||
var plane = new THREE.Mesh( geometry, material );
|
||||
plane.position.x = section[i].mesh.position.x;
|
||||
plane.position.y = 2+Math.random()*10;
|
||||
plane.position.z = section[i].mesh.position.z;
|
||||
plane.rotation.x = -Math.PI/2;
|
||||
plane.rotation.z = section[i].mesh.rotation._z;
|
||||
|
||||
// if( plane.rotation.z != ){
|
||||
//
|
||||
// if( plane.rotation.z != ){
|
||||
//
|
||||
// }
|
||||
var geometry1 = new THREE.CircleBufferGeometry( 1, 16 );
|
||||
var material1 = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
|
||||
var geometry2 = new THREE.CircleBufferGeometry( 1, 16 );
|
||||
var material2 = new THREE.MeshBasicMaterial( { color: 0xff2000 } );
|
||||
var circle1 = new THREE.Mesh( geometry1, material1 );
|
||||
|
||||
circle1.rotation.x = -Math.PI/2;
|
||||
|
||||
|
||||
var circle2 = new THREE.Mesh( geometry2, material2 );
|
||||
|
||||
circle2.rotation.x = -Math.PI/2;
|
||||
|
||||
circle1.position.x = plane.position.x + (section[i].lengthFact)/2*Math.cos(plane.rotation.z);
|
||||
circle1.position.y = 1;
|
||||
circle1.position.z = plane.position.z - (section[i].lengthFact)/2*Math.sin(plane.rotation.z);
|
||||
circle2.position.x = plane.position.x - (section[i].lengthFact)/2*Math.cos(plane.rotation.z);
|
||||
circle2.position.y = 0.5;
|
||||
circle2.position.z = plane.position.z + (section[i].lengthFact)/2*Math.sin(plane.rotation.z);
|
||||
// }
|
||||
var geometry1 = new THREE.CircleBufferGeometry( 1, 16 );
|
||||
var material1 = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
|
||||
var geometry2 = new THREE.CircleBufferGeometry( 1, 16 );
|
||||
var material2 = new THREE.MeshBasicMaterial( { color: 0xff2000 } );
|
||||
var circle1 = new THREE.Mesh( geometry1, material1 );
|
||||
|
||||
|
||||
circle1.rotation.x = -Math.PI/2;
|
||||
|
||||
|
||||
var circle2 = new THREE.Mesh( geometry2, material2 );
|
||||
|
||||
circle2.rotation.x = -Math.PI/2;
|
||||
|
||||
circle1.position.x = plane.position.x + (section[i].lengthFact)/2*Math.cos(plane.rotation.z);
|
||||
circle1.position.y = 1;
|
||||
circle1.position.z = plane.position.z - (section[i].lengthFact)/2*Math.sin(plane.rotation.z);
|
||||
circle2.position.x = plane.position.x - (section[i].lengthFact)/2*Math.cos(plane.rotation.z);
|
||||
circle2.position.y = 0.5;
|
||||
circle2.position.z = plane.position.z + (section[i].lengthFact)/2*Math.sin(plane.rotation.z);
|
||||
// }
|
||||
scene.add( circle1 );
|
||||
scene.add( circle2 );
|
||||
scene.add( plane );
|
||||
mapdata.sectionlist.sections.datalist[i].rail = [{
|
||||
x:circle2.position.x,
|
||||
z:circle2.position.z
|
||||
},{
|
||||
x:circle1.position.x,
|
||||
z:circle1.position.z
|
||||
}];
|
||||
|
||||
|
||||
|
||||
scene.add( circle1 );
|
||||
scene.add( circle2 );
|
||||
scene.add( plane );
|
||||
mapdata.sectionlist.sections.datalist[i].rail = [{
|
||||
x:circle2.position.x,
|
||||
z:circle2.position.z
|
||||
},{
|
||||
x:circle1.position.x,
|
||||
z:circle1.position.z
|
||||
}];
|
||||
// console.log(i);
|
||||
// console.log(section[i].mesh);
|
||||
// console.log(mapdata.sectionlist.sections.datalist[i].rail);
|
||||
@ -80,8 +76,6 @@ export function RailList(){
|
||||
// circle1.rotation.x = -Math.PI/2;
|
||||
// scene.add( circle1 );
|
||||
// }
|
||||
|
||||
|
||||
};
|
||||
|
||||
this.getrail = function(){
|
||||
|
@ -50,11 +50,12 @@ export function Jl3ddevice(dom,serviceid) {
|
||||
//视角轨迹控制器
|
||||
this.controls = new THREE.OrbitControls(camera, dom);
|
||||
this.controls.target = new THREE.Vector3(500,1000,0);
|
||||
this.controls.screenSpacePanning = true;
|
||||
this.controls.update();
|
||||
|
||||
//定义场景(渲染容器)
|
||||
let scene = new THREE.Scene();
|
||||
var bgTexture = new THREE.TextureLoader().load("../../static/background/background.jpg");
|
||||
var bgTexture = new THREE.TextureLoader().load("../../static/background/other.jpg");
|
||||
scene.background = bgTexture;
|
||||
|
||||
//定义全局光
|
||||
|
@ -169,9 +169,9 @@ export function StationStandListN() {
|
||||
// newstationmesh.rotation.z = standsdata[i].rotation._z;
|
||||
newstationstand.mesh = newstationmesh;
|
||||
scope.group.add(newstationmesh);
|
||||
|
||||
//
|
||||
scope.list[standsdata[i].code] = newstationstand;
|
||||
|
||||
//
|
||||
let newclip = selectmesh.animations[ 0 ];
|
||||
for(let j=0;j<newstationmesh.children.length;j++){
|
||||
|
||||
|
Binary file not shown.
BIN
static/model/jdq/jdqh18old.FBX
Normal file
BIN
static/model/jdq/jdqh18old.FBX
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user