修改大铁三维单体设备道岔转辙机zdj9
This commit is contained in:
parent
ee21f2f67c
commit
7f15943ee1
@ -19,58 +19,119 @@ export function Moveanimate(main){
|
||||
scope.animatelist[switchmodel.animacode+"chaijie"] = [];
|
||||
scope.animatelist[switchmodel.animacode+"fuwei"] = [];
|
||||
for(let i=0,leni=switchmodel.children.length;i<leni;i++){
|
||||
if(switchmodel.children[i].name == "DDJ"){
|
||||
if(switchmodel.children[i].name == "SJ"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x-1.5,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x-3.5,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"dizuoon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x-1.5,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x-3.5,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"dizuooff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "DJZ"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x-3,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"Lxingon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x-3,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"Lxingoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "DINGK"){
|
||||
if(switchmodel.children[i].name == "ZZJJG"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+9,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"jiaoxingxiantieon",points1,0.5,true,0);
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"dizuoon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+9,switchmodel.children[i].position.z));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"dizuooff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "BSGXT"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z-10));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"dizuoon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z-10));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"dizuooff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "DZGDG"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z-10));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"dizuoon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z-10));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"dizuooff",points2,0.5,true,0);
|
||||
}
|
||||
|
||||
if(switchmodel.children[i].name == "SGBHG"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z-5));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"dizuoon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z-5));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"dizuooff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "SGBHG1"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z-8));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"dizuoon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z-8));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"dizuooff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "ZDKBQ"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+3,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"dizuoon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+3,switchmodel.children[i].position.z));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"dizuooff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "ZDKBQ1"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x+3,switchmodel.children[i].position.y+3,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"Lxingon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x+3,switchmodel.children[i].position.y+3,switchmodel.children[i].position.z));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"Lxingoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "DDJ"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"jiaoxingxiantieon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"jiaoxingxiantieoff",points2,0.5,true,0);
|
||||
}
|
||||
|
||||
if(switchmodel.children[i].name == "SZ"){
|
||||
if(switchmodel.children[i].name == "QDPSDPBST"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x-1.5,switchmodel.children[i].position.y,switchmodel.children[i].position.z-1));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"zhongchuipianon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.xx-1.5,switchmodel.children[i].position.y,switchmodel.children[i].position.z-1));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"zhongchuipianoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "JSQ"){
|
||||
if(switchmodel.children[i].name == "SKJPJ"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x-3,switchmodel.children[i].position.y+3,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x-3,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"laganon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x-3,switchmodel.children[i].position.y+3,switchmodel.children[i].position.z));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x-3,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"laganoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "YWJCQ"){
|
||||
if(switchmodel.children[i].name == "MCLJQ"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z+3));
|
||||
@ -80,70 +141,70 @@ export function Moveanimate(main){
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"dongjiedianzhouoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "ESWCJJ"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"neibuon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"neibuoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "AQJD"){
|
||||
if(switchmodel.children[i].name == "SG"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z-2));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"jiedianon",points1,0.5,true,0);
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"neibuon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z-2));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"neibuoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "SG1"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z-3));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"jiedianon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z-3));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"jiedianoff",points2,0.5,true,0);
|
||||
|
||||
}
|
||||
if(switchmodel.children[i].name == "QDP"){
|
||||
if(switchmodel.children[i].name == "TBT"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z-3));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"yapianon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z-3));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"yapianoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "SDP"){
|
||||
let points1 = [];
|
||||
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z-4));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"fanghuozhaoon",points1,0.5,true,0);
|
||||
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"yapianon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z-4));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"yapianoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "GZSG"){
|
||||
let points1 = [];
|
||||
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x+1,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z-5));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"fanghuozhaoon",points1,0.5,true,0);
|
||||
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x+1,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z-5));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"fanghuozhaooff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "ZDKBQ"){
|
||||
if(switchmodel.children[i].name == "BSG"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+3,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x-1,switchmodel.children[i].position.y,switchmodel.children[i].position.z-5));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"dianyuanpianon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+3,switchmodel.children[i].position.z));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x-1,switchmodel.children[i].position.y,switchmodel.children[i].position.z-5));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"dianyuanpianoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "ZZ"){
|
||||
if(switchmodel.children[i].name == "DZG"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x+3,switchmodel.children[i].position.y+3,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x+1,switchmodel.children[i].position.y+3,switchmodel.children[i].position.z-5));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"xinpianon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x+3,switchmodel.children[i].position.y+3,switchmodel.children[i].position.z));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x+1,switchmodel.children[i].position.y+3,switchmodel.children[i].position.z-5));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"xinpianoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name =="BSG"){
|
||||
if(switchmodel.children[i].name =="AQKG"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x+1,switchmodel.children[i].position.y,switchmodel.children[i].position.z-5));
|
||||
@ -153,7 +214,7 @@ export function Moveanimate(main){
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"jueyuanzhouoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name =="DZG"){
|
||||
if(switchmodel.children[i].name =="LJX"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x-1,switchmodel.children[i].position.y,switchmodel.children[i].position.z-5));
|
||||
@ -164,13 +225,13 @@ export function Moveanimate(main){
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"cigangoff",points2,0.5,true,0);
|
||||
}
|
||||
|
||||
if(switchmodel.children[i].name =="CTK"){
|
||||
if(switchmodel.children[i].name =="ZDQLJG"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x-1,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z-5));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"ccichuihuqion",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x-1,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z-5));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"ccichuihuqioff",points2,0.5,true,0);
|
||||
}
|
||||
@ -182,38 +243,48 @@ export function Moveanimate(main){
|
||||
// points.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
// scope.initanimate(switchmodel.children[i],switchmodel.name+"select1",points,true);
|
||||
let modelorderlist = [];
|
||||
|
||||
console.log(switchmodel);
|
||||
for(let i=0;i<switchmodel.children.length;i++){
|
||||
console.log(switchmodel.children[i].name);
|
||||
console.log(switchmodel.children[i]);
|
||||
}
|
||||
modelorderlist[switchmodel.animacode] = [
|
||||
{name:"SZ",pos:[-1.5,0,-1]},
|
||||
{name:"DINGK",pos:[0,9,0]},
|
||||
|
||||
{name:"DJZ",pos:[-3,0,0]},
|
||||
{name:"DDJ",pos:[-1.5,0,0]},
|
||||
|
||||
{name:"JSQ",pos:[-3,3,0]},
|
||||
{name:"SJ",pos:[-3.5,0,-1]},
|
||||
{name:"ZZJJG",pos:[0,9,0]},
|
||||
{name:"BSGXT",pos:[0,0,-10]},
|
||||
{name:"DZGDG",pos:[0,0,-10]},
|
||||
{name:"SGBHG",pos:[0,0,-5]},
|
||||
{name:"SGBHG1",pos:[0,0,-8]},
|
||||
|
||||
{name:"ZDKBQ",pos:[0,3,0]},
|
||||
{name:"ZZ",pos:[3,3,0]},
|
||||
|
||||
{name:"ESWCJJ",pos:[0,6,0]},
|
||||
{name:"CTK",pos:[0,6,0]},
|
||||
{name:"YWJCQ",pos:[0,6,3]},
|
||||
{name:"AQJD",pos:[0,6,-2]},
|
||||
{name:"QDP",pos:[0,6,-3]},
|
||||
{name:"SDP",pos:[0,6,-4]},
|
||||
|
||||
{name:"BSG",pos:[1,0,-5]},
|
||||
{name:"DZG",pos:[-1,0,-5]}
|
||||
{name:"ZDKBQ1",pos:[3,3,0]},
|
||||
{name:"DDJ",pos:[0,6,0]},
|
||||
{name:"QDPSDPBST",pos:[0,6,0]},
|
||||
{name:"SKJPJ",pos:[0,6,0]},
|
||||
{name:"MCLJQ",pos:[0,6,3]},
|
||||
{name:"SG",pos:[0,6,-2]},
|
||||
{name:"SG1",pos:[0,6,-3]},
|
||||
{name:"TBT",pos:[0,6,-4]},
|
||||
{name:"GZSG",pos:[1,0,-5]},
|
||||
{name:"BSG",pos:[-1,0,-5]},
|
||||
{name:"DZG",pos:[1,0,-5]},
|
||||
{name:"AQKG",pos:[-1,0,-5]},
|
||||
{name:"LJX",pos:[1,0,-5]},
|
||||
{name:"ZDQLJG",pos:[-1,0,-5]}
|
||||
];
|
||||
|
||||
scope.animatelist[switchmodel.animacode+"on"] = [];
|
||||
scope.animatelist[switchmodel.animacode+"off"] = [];
|
||||
|
||||
console.log("==========");
|
||||
for(let i=0,leni=modelorderlist[switchmodel.animacode].length;i<leni;i++){
|
||||
|
||||
let orderdata = modelorderlist[switchmodel.animacode];
|
||||
|
||||
console.log(switchmodel.animacode);
|
||||
console.log(orderdata[i].name);
|
||||
let modelon = switchmodel.getObjectByName(orderdata[i].name);
|
||||
// modelon.helpbox = undefined;
|
||||
console.log(modelon);
|
||||
let pointson = [];
|
||||
pointson.push(new THREE.Vector3(modelon.position.x,modelon.position.y,modelon.position.z));
|
||||
pointson.push(new THREE.Vector3(modelon.position.x+orderdata[i].pos[0],modelon.position.y+orderdata[i].pos[1],modelon.position.z+orderdata[i].pos[2]));
|
||||
|
@ -20,6 +20,138 @@ export function Textconfig(){
|
||||
show:true,
|
||||
msg:null,
|
||||
};
|
||||
|
||||
// if(selectmodel.children[i].name == ""){
|
||||
// part.text = "";
|
||||
// part.msg = "";
|
||||
// selectmodel.children[i].text = "";
|
||||
// }
|
||||
|
||||
|
||||
if(selectmodel.children[i].name == "ZZJJG"){
|
||||
part.text = "转辙机机盖";
|
||||
part.msg = "转辙机机盖";
|
||||
selectmodel.children[i].text = "转辙机机盖";
|
||||
}
|
||||
|
||||
|
||||
if(selectmodel.children[i].name == "ZZJDZ"){
|
||||
part.text = "转辙机底座";
|
||||
part.msg = "转辙机底座";
|
||||
selectmodel.children[i].text = "转辙机底座";
|
||||
}
|
||||
|
||||
|
||||
if(selectmodel.children[i].name == "SJ"){
|
||||
part.text = "锁具";
|
||||
part.msg = "锁具";
|
||||
selectmodel.children[i].text = "锁具";
|
||||
}
|
||||
|
||||
|
||||
if(selectmodel.children[i].name == "DZGDG"){
|
||||
part.text = "动作杆端盖";
|
||||
part.msg = "动作杆端盖";
|
||||
selectmodel.children[i].text = "动作杆端盖";
|
||||
}
|
||||
|
||||
if(selectmodel.children[i].name == "SGBHG1"){
|
||||
part.text = "丝杆保护盖";
|
||||
part.msg = "丝杆保护盖";
|
||||
selectmodel.children[i].text = "丝杆保护盖";
|
||||
}
|
||||
|
||||
if(selectmodel.children[i].name == "SGBHG"){
|
||||
part.text = "丝杆保护盖";
|
||||
part.msg = "丝杆保护盖";
|
||||
selectmodel.children[i].text = "丝杆保护盖";
|
||||
}
|
||||
|
||||
if(selectmodel.children[i].name == "BSGXT"){
|
||||
part.text = "表示杆袖筒";
|
||||
part.msg = "表示杆袖筒";
|
||||
selectmodel.children[i].text = "表示杆袖筒";
|
||||
}
|
||||
|
||||
if(selectmodel.children[i].name == "AQJDLQ"){
|
||||
part.text = "安全接点螺圈";
|
||||
part.msg = "安全接点螺圈";
|
||||
selectmodel.children[i].text = "安全接点螺圈";
|
||||
}
|
||||
|
||||
if(selectmodel.children[i].name == "AQKG"){
|
||||
part.text = "安全开关";
|
||||
part.msg = "安全开关";
|
||||
selectmodel.children[i].text = "安全开关";
|
||||
}
|
||||
|
||||
if(selectmodel.children[i].name == "LJX"){
|
||||
part.text = "连接销";
|
||||
part.msg = "连接销";
|
||||
selectmodel.children[i].text = "连接销";
|
||||
}
|
||||
|
||||
if(selectmodel.children[i].name == "ZDQLJG"){
|
||||
part.text = "遮断器连接杆";
|
||||
part.msg = "遮断器连接杆";
|
||||
selectmodel.children[i].text = "遮断器连接杆";
|
||||
}
|
||||
|
||||
if(selectmodel.children[i].name == "ZDKBQ1"){
|
||||
part.text = "自动开闭器";
|
||||
part.msg = "自动开闭器";
|
||||
selectmodel.children[i].text = "自动开闭器";
|
||||
}
|
||||
|
||||
if(selectmodel.children[i].name == "QDPSDPBST"){
|
||||
part.text = "启动片速动片闭锁铁";
|
||||
part.msg = "启动片速动片闭锁铁";
|
||||
selectmodel.children[i].text = "启动片速动片闭锁铁";
|
||||
}
|
||||
|
||||
if(selectmodel.children[i].name == "SKJPJ"){
|
||||
part.text = "锁块及配件";
|
||||
part.msg = "锁块及配件";
|
||||
selectmodel.children[i].text = "锁块及配件";
|
||||
}
|
||||
|
||||
if(selectmodel.children[i].name == "SG"){
|
||||
part.text = "丝杠";
|
||||
part.msg = "丝杠";
|
||||
selectmodel.children[i].text = "丝杠";
|
||||
}
|
||||
|
||||
if(selectmodel.children[i].name == "SG1"){
|
||||
part.text = "丝杠";
|
||||
part.msg = "丝杠";
|
||||
selectmodel.children[i].text = "丝杠";
|
||||
}
|
||||
|
||||
if(selectmodel.children[i].name == "MCLJQ"){
|
||||
part.text = "摩擦联结器";
|
||||
part.msg = "摩擦联结器";
|
||||
selectmodel.children[i].text = "摩擦联结器";
|
||||
}
|
||||
if(selectmodel.children[i].name == "DZG"){
|
||||
part.text = "动作杆";
|
||||
part.msg = "动作杆";
|
||||
selectmodel.children[i].text = "动作杆";
|
||||
}
|
||||
|
||||
if(selectmodel.children[i].name == "TBT"){
|
||||
part.text = "推板套";
|
||||
part.msg = "推板套";
|
||||
selectmodel.children[i].text = "推板套";
|
||||
}
|
||||
|
||||
if(selectmodel.children[i].name == "GZSG"){
|
||||
part.text = "滚珠丝杠";
|
||||
part.msg = "滚珠丝杠";
|
||||
selectmodel.children[i].text = "滚珠丝杠";
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(selectmodel.children[i].name == "AQJD"){
|
||||
part.text = "安全接点";
|
||||
part.msg = "安全接点应接触良好。在插入手摇把或钥匙时,安全接点应可靠断开,非经人工恢复不得接通电路。";
|
||||
|
@ -162,11 +162,11 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
|
||||
scope.updateSwitch(data.srSwitch[1]);
|
||||
}
|
||||
}
|
||||
if(data.type == "DeviceCtrl_3D"){
|
||||
if(data.body.code == scope.nowcode){
|
||||
scope.updateaction(data.body);
|
||||
}
|
||||
}
|
||||
// if(data.type == "DeviceCtrl_3D"){
|
||||
// if(data.body.code == scope.nowcode){
|
||||
// scope.updateaction(data.body);
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
let changeelement = document.getElementById('jl3d');
|
||||
@ -339,7 +339,6 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
|
||||
}
|
||||
if (data._type == "Signal") {
|
||||
|
||||
console.log(data);
|
||||
if(data.type == "ARRIVAL"){
|
||||
scope.showmodel = scope.modelmanager.signal5.mesh;
|
||||
}else if(data.type == "EXIT"){
|
||||
@ -399,9 +398,7 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
|
||||
|
||||
let switchActionMode = true;
|
||||
this.changeAnimate = function(type){
|
||||
//
|
||||
|
||||
console.log(type);
|
||||
// console.log(scope.modelmanager.staticswitchmodel);
|
||||
|
||||
// scope.modelmanager.staticswitchmodel.action["2kai"].reset();
|
||||
@ -847,6 +844,7 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
|
||||
}
|
||||
|
||||
function initstatus(data) {
|
||||
|
||||
if (data._type == "Switch") {
|
||||
if (data.normalPosition == "0") {
|
||||
scope.modelmanager.switchmodel.normalPosition = "0";
|
||||
|
@ -58,6 +58,7 @@ export function ModelManager(){
|
||||
};
|
||||
|
||||
|
||||
|
||||
this.loadpromise = function (data,mixers){
|
||||
let initlist = [];
|
||||
let staticSwitch = {
|
||||
@ -110,11 +111,22 @@ export function ModelManager(){
|
||||
};
|
||||
initlist.push(fbxpromise(signal2,mixers,scope.signal2));
|
||||
|
||||
let zdj9Switch = {
|
||||
assetname:"zdj9",
|
||||
deviceType:"OtherSwitch",
|
||||
id:"zdj9",
|
||||
packageName:"zdj9",
|
||||
type:"static",
|
||||
url: "/jl3d/railway/model/ZDJ9_DH622.FBX"
|
||||
};
|
||||
///MODEL/2021-06-22/66-64647.FBX
|
||||
initlist.push(fbxpromise(zdj9Switch,mixers,scope.switchmodel));
|
||||
|
||||
for(let i=0,leni=data.length;i<leni;i++){
|
||||
|
||||
if(data[i].deviceType == "DeviceSwitch"){
|
||||
initlist.push(fbxpromise(data[i],mixers,scope.switchmodel));
|
||||
}
|
||||
// if(data[i].deviceType == "DeviceSwitch"){
|
||||
// initlist.push(fbxpromise(data[i],mixers,scope.switchmodel));
|
||||
// }
|
||||
|
||||
if(data[i].deviceType == "DeviceSection"){
|
||||
initlist.push(fbxpromise(data[i],mixers,scope.sectionmodel));
|
||||
@ -144,9 +156,9 @@ function fbxpromise(asset,mixers,model){
|
||||
}else{
|
||||
modelurl = BASE_ASSET_API+asset.url;
|
||||
}
|
||||
|
||||
loader.load( modelurl, function ( object ) {
|
||||
let mixer = new THREE.AnimationMixer( object );
|
||||
|
||||
object.traverse( function ( child ) {
|
||||
if ( child.isMesh ) {
|
||||
child.castShadow = true;
|
||||
@ -155,6 +167,7 @@ function fbxpromise(asset,mixers,model){
|
||||
} );
|
||||
object.animacode = model.code;
|
||||
object.deviceType = asset.deviceType;
|
||||
object.assetname = asset.assetname;
|
||||
if(asset.deviceType == "ARRIVAL" || asset.deviceType == "EXIT" || asset.deviceType == "PASSING" || asset.deviceType == "SHUNTING"){
|
||||
for(let j=0;j<object.children.length;j++){
|
||||
let newmaterial = new THREE.MeshPhongMaterial();
|
||||
|
@ -88,7 +88,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
|
||||
let planeCloud = new THREE.Mesh( new THREE.PlaneGeometry( 64, 64 ) );
|
||||
let geoCloud = new THREE.Geometry();
|
||||
|
||||
for ( var i = 0; i < 20; i++ ) {
|
||||
for ( var i = 0; i < 15; i++ ) {
|
||||
|
||||
planeCloud.position.x = 1000 - 2000 * Math.random();
|
||||
planeCloud.position.y = Math.random() * 500+100 ;
|
||||
|
BIN
static/jl3d/railway/model/ZDJ9_DH622.FBX
Normal file
BIN
static/jl3d/railway/model/ZDJ9_DH622.FBX
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user