三维设备展示页面转辙机界面样式逻辑修改
This commit is contained in:
parent
c8544909f7
commit
1d3c00502a
@ -19,162 +19,162 @@ export function Moveanimate(main){
|
||||
//
|
||||
// for(let j=0,lenj=modellist.length;j<lenj;j++){
|
||||
//
|
||||
// for(let i=0,leni=modellist[j].children.length;i<leni;i++){
|
||||
// for(let i=0,leni=switchmodel.children.length;i<leni;i++){
|
||||
//
|
||||
// if(modellist[j].children[i].name == "dizuo"){
|
||||
// if(switchmodel.children[i].name == "dizuo"){
|
||||
// let points1 = [];
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z-150));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"dizuoon",points1,0.5,true,0);
|
||||
// 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-150));
|
||||
// scope.initanimate(switchmodel.children[i],switchmodel.name+"dizuoon",points1,0.5,true,0);
|
||||
// let points2 = [];
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z-150));
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"dizuooff",points2,0.5,true,0);
|
||||
// points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z-150));
|
||||
// points2.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+"dizuooff",points2,0.5,true,0);
|
||||
//
|
||||
//
|
||||
// }
|
||||
// if(modellist[j].children[i].name == "Lxing"){
|
||||
// if(switchmodel.children[i].name == "Lxing"){
|
||||
// let points1 = [];
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y-50,modellist[j].children[i].position.z));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"Lxingon",points1,0.5,true,0);
|
||||
// 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-50,switchmodel.children[i].position.z));
|
||||
// scope.initanimate(switchmodel.children[i],switchmodel.name+"Lxingon",points1,0.5,true,0);
|
||||
// let points2 = [];
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y-50,modellist[j].children[i].position.z));
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"Lxingoff",points2,0.5,true,0);
|
||||
// points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y-50,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(switchmodel.children[i],switchmodel.name+"Lxingoff",points2,0.5,true,0);
|
||||
// }
|
||||
// if(modellist[j].children[i].name == "jiaoxingxiantie"){
|
||||
// if(switchmodel.children[i].name == "jiaoxingxiantie"){
|
||||
// let points1 = [];
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z+25));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"jiaoxingxiantieon",points1,0.5,true,0);
|
||||
// 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+25));
|
||||
// scope.initanimate(switchmodel.children[i],switchmodel.name+"jiaoxingxiantieon",points1,0.5,true,0);
|
||||
// let points2 = [];
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z+25));
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"jiaoxingxiantieoff",points2,0.5,true,0);
|
||||
// points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z+25));
|
||||
// points2.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+"jiaoxingxiantieoff",points2,0.5,true,0);
|
||||
// }
|
||||
// if(modellist[j].children[i].name == "xianquan"){
|
||||
// if(switchmodel.children[i].name == "xianquan"){
|
||||
// let points1 = [];
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y-100,modellist[j].children[i].position.z));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"xianquanon",points1,0.5,true,0);
|
||||
// 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-100,switchmodel.children[i].position.z));
|
||||
// scope.initanimate(switchmodel.children[i],switchmodel.name+"xianquanon",points1,0.5,true,0);
|
||||
// let points2 = [];
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y-100,modellist[j].children[i].position.z));
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"xianquanoff",points2,0.5,true,0);
|
||||
// points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y-100,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(switchmodel.children[i],switchmodel.name+"xianquanoff",points2,0.5,true,0);
|
||||
// }
|
||||
// if(modellist[j].children[i].name == "zhongchuipian"){
|
||||
// if(switchmodel.children[i].name == "zhongchuipian"){
|
||||
// let points1 = [];
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y-25,modellist[j].children[i].position.z));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"zhongchuipianon",points1,0.5,true,0);
|
||||
// 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-25,switchmodel.children[i].position.z));
|
||||
// scope.initanimate(switchmodel.children[i],switchmodel.name+"zhongchuipianon",points1,0.5,true,0);
|
||||
// let points2 = [];
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+25,modellist[j].children[i].position.z));
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"zhongchuipianoff",points2,0.5,true,0);
|
||||
// points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+25,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(switchmodel.children[i],switchmodel.name+"zhongchuipianoff",points2,0.5,true,0);
|
||||
// }
|
||||
// if(modellist[j].children[i].name == "lagan"){
|
||||
// if(switchmodel.children[i].name == "lagan"){
|
||||
// let points1 = [];
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+100,modellist[j].children[i].position.z+50));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"laganon",points1,0.5,true,0);
|
||||
// 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+100,switchmodel.children[i].position.z+50));
|
||||
// scope.initanimate(switchmodel.children[i],switchmodel.name+"laganon",points1,0.5,true,0);
|
||||
// let points2 = [];
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+100,modellist[j].children[i].position.z+50));
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"laganoff",points2,0.5,true,0);
|
||||
// points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+100,switchmodel.children[i].position.z+50));
|
||||
// points2.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+"laganoff",points2,0.5,true,0);
|
||||
// }
|
||||
// if(modellist[j].children[i].name == "dongjiedianzhou"){
|
||||
// if(switchmodel.children[i].name == "dongjiedianzhou"){
|
||||
// let points1 = [];
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+100,modellist[j].children[i].position.z+25));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"dongjiedianzhouon",points1,0.5,true,0);
|
||||
// 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+100,switchmodel.children[i].position.z+25));
|
||||
// scope.initanimate(switchmodel.children[i],switchmodel.name+"dongjiedianzhouon",points1,0.5,true,0);
|
||||
// let points2 = [];
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+100,modellist[j].children[i].position.z+25));
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"dongjiedianzhouoff",points2,0.5,true,0);
|
||||
// points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+100,switchmodel.children[i].position.z+25));
|
||||
// points2.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+"dongjiedianzhouoff",points2,0.5,true,0);
|
||||
// }
|
||||
// if(modellist[j].children[i].name == "neibu"){
|
||||
// if(switchmodel.children[i].name == "neibu"){
|
||||
// let points1 = [];
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z-50));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"neibuon",points1,0.5,true,0);
|
||||
// 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-50));
|
||||
// scope.initanimate(switchmodel.children[i],switchmodel.name+"neibuon",points1,0.5,true,0);
|
||||
// let points2 = [];
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z-50));
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"neibuoff",points2,0.5,true,0);
|
||||
// points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z-50));
|
||||
// points2.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+"neibuoff",points2,0.5,true,0);
|
||||
// }
|
||||
// if(modellist[j].children[i].name == "jiedian"){
|
||||
// if(switchmodel.children[i].name == "jiedian"){
|
||||
// let points1 = [];
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+100,modellist[j].children[i].position.z-15));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"jiedianon",points1,0.5,true,0);
|
||||
// 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+100,switchmodel.children[i].position.z-15));
|
||||
// scope.initanimate(switchmodel.children[i],switchmodel.name+"jiedianon",points1,0.5,true,0);
|
||||
// let points2 = [];
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+100,modellist[j].children[i].position.z-15));
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"jiedianoff",points2,0.5,true,0);
|
||||
// points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+100,switchmodel.children[i].position.z-15));
|
||||
// points2.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+"jiedianoff",points2,0.5,true,0);
|
||||
//
|
||||
// }
|
||||
// if(modellist[j].children[i].name == "yapian"){
|
||||
// if(switchmodel.children[i].name == "yapian"){
|
||||
// let points1 = [];
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+100,modellist[j].children[i].position.z-25));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"yapianon",points1,0.5,true,0);
|
||||
// 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+100,switchmodel.children[i].position.z-25));
|
||||
// scope.initanimate(switchmodel.children[i],switchmodel.name+"yapianon",points1,0.5,true,0);
|
||||
// let points2 = [];
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+100,modellist[j].children[i].position.z-25));
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"yapianoff",points2,0.5,true,0);
|
||||
// points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+100,switchmodel.children[i].position.z-25));
|
||||
// points2.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+"yapianoff",points2,0.5,true,0);
|
||||
// }
|
||||
// if(modellist[j].children[i].name == "fanghuozhao"){
|
||||
// if(switchmodel.children[i].name == "fanghuozhao"){
|
||||
// let points1 = [];
|
||||
//
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z+200));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"fanghuozhaoon",points1,0.5,true,0);
|
||||
// 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+200));
|
||||
// scope.initanimate(switchmodel.children[i],switchmodel.name+"fanghuozhaoon",points1,0.5,true,0);
|
||||
//
|
||||
// let points2 = [];
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z+200));
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"fanghuozhaooff",points2,0.5,true,0);
|
||||
// points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z+200));
|
||||
// points2.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+"fanghuozhaooff",points2,0.5,true,0);
|
||||
// }
|
||||
// if(modellist[j].children[i].name == "dianyuanpian"){
|
||||
// if(switchmodel.children[i].name == "dianyuanpian"){
|
||||
// let points1 = [];
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z-50));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"dianyuanpianon",points1,0.5,true,0);
|
||||
// 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-50));
|
||||
// scope.initanimate(switchmodel.children[i],switchmodel.name+"dianyuanpianon",points1,0.5,true,0);
|
||||
// let points2 = [];
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z-50));
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"dianyuanpianoff",points2,0.5,true,0);
|
||||
// points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z-50));
|
||||
// points2.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+"dianyuanpianoff",points2,0.5,true,0);
|
||||
// }
|
||||
// if(modellist[j].children[i].name == "xinpian"){
|
||||
// if(switchmodel.children[i].name == "xinpian"){
|
||||
// let points1 = [];
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+150,modellist[j].children[i].position.z));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"xinpianon",points1,0.5,true,0);
|
||||
// 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+150,switchmodel.children[i].position.z));
|
||||
// scope.initanimate(switchmodel.children[i],switchmodel.name+"xinpianon",points1,0.5,true,0);
|
||||
// let points2 = [];
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+150,modellist[j].children[i].position.z));
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"xinpianoff",points2,0.5,true,0);
|
||||
// points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+150,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(switchmodel.children[i],switchmodel.name+"xinpianoff",points2,0.5,true,0);
|
||||
// }
|
||||
// if(modellist[j].children[i].name =="jueyuanzhou"){
|
||||
// if(switchmodel.children[i].name =="jueyuanzhou"){
|
||||
// let points1 = [];
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+100,modellist[j].children[i].position.z));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"jueyuanzhouon",points1,0.5,true,0);
|
||||
// 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+100,switchmodel.children[i].position.z));
|
||||
// scope.initanimate(switchmodel.children[i],switchmodel.name+"jueyuanzhouon",points1,0.5,true,0);
|
||||
// let points2 = [];
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+100,modellist[j].children[i].position.z));
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"jueyuanzhouoff",points2,0.5,true,0);
|
||||
// points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+100,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(switchmodel.children[i],switchmodel.name+"jueyuanzhouoff",points2,0.5,true,0);
|
||||
// }
|
||||
// if(modellist[j].children[i].name =="cigang"){
|
||||
// if(switchmodel.children[i].name =="cigang"){
|
||||
// let points1 = [];
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y-100,modellist[j].children[i].position.z+100));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"cigangon",points1,0.5,true,0);
|
||||
// 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-100,switchmodel.children[i].position.z+100));
|
||||
// scope.initanimate(switchmodel.children[i],switchmodel.name+"cigangon",points1,0.5,true,0);
|
||||
// let points2 = [];
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y-100,modellist[j].children[i].position.z+100));
|
||||
// points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"cigangoff",points2,0.5,true,0);
|
||||
// points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y-100,switchmodel.children[i].position.z+100));
|
||||
// points2.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+"cigangoff",points2,0.5,true,0);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
@ -184,328 +184,213 @@ export function Moveanimate(main){
|
||||
//
|
||||
//
|
||||
// }
|
||||
this.initlistnew = function(modellist){
|
||||
|
||||
for(let j=0,lenj=modellist.length;j<lenj;j++){
|
||||
console.log(modellist[j].code+"==================================");
|
||||
scope.animatelist[modellist[j].code+"chaijie"] = [];
|
||||
scope.animatelist[modellist[j].code+"fuwei"] = [];
|
||||
for(let i=0,leni=modellist[j].children.length;i<leni;i++){
|
||||
console.log(modellist[j].children[i].name);
|
||||
if(modellist[j].children[i].name == "dizuo"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z-150));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"chaijie"],modellist[j].children[i],modellist[j].name+"dizuoon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z-150));
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"fuwei"],modellist[j].children[i],modellist[j].name+"dizuooff",points2,0.5,true,0);
|
||||
this.initlistnew = function(switchmodel){
|
||||
|
||||
|
||||
}
|
||||
if(modellist[j].children[i].name == "Lxing"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y-50,modellist[j].children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"chaijie"],modellist[j].children[i],modellist[j].name+"Lxingon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y-50,modellist[j].children[i].position.z));
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"fuwei"],modellist[j].children[i],modellist[j].name+"Lxingoff",points2,0.5,true,0);
|
||||
}
|
||||
if(modellist[j].children[i].name == "jiaoxingxiantie"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z+25));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"chaijie"],modellist[j].children[i],modellist[j].name+"jiaoxingxiantieon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z+25));
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"fuwei"],modellist[j].children[i],modellist[j].name+"jiaoxingxiantieoff",points2,0.5,true,0);
|
||||
}
|
||||
if(modellist[j].children[i].name == "xianquan"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y-100,modellist[j].children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"chaijie"],modellist[j].children[i],modellist[j].name+"xianquanon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y-100,modellist[j].children[i].position.z));
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"fuwei"],modellist[j].children[i],modellist[j].name+"xianquanoff",points2,0.5,true,0);
|
||||
}
|
||||
if(modellist[j].children[i].name == "zhongchuipian"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y-25,modellist[j].children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"chaijie"],modellist[j].children[i],modellist[j].name+"zhongchuipianon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+25,modellist[j].children[i].position.z));
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"fuwei"],modellist[j].children[i],modellist[j].name+"zhongchuipianoff",points2,0.5,true,0);
|
||||
}
|
||||
if(modellist[j].children[i].name == "lagan"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+100,modellist[j].children[i].position.z+50));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"chaijie"],modellist[j].children[i],modellist[j].name+"laganon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+100,modellist[j].children[i].position.z+50));
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"fuwei"],modellist[j].children[i],modellist[j].name+"laganoff",points2,0.5,true,0);
|
||||
}
|
||||
if(modellist[j].children[i].name == "dongjiedianzhou"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+100,modellist[j].children[i].position.z+25));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"chaijie"],modellist[j].children[i],modellist[j].name+"dongjiedianzhouon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+100,modellist[j].children[i].position.z+25));
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"fuwei"],modellist[j].children[i],modellist[j].name+"dongjiedianzhouoff",points2,0.5,true,0);
|
||||
}
|
||||
if(modellist[j].children[i].name == "neibu"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z-50));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"chaijie"],modellist[j].children[i],modellist[j].name+"neibuon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z-50));
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"fuwei"],modellist[j].children[i],modellist[j].name+"neibuoff",points2,0.5,true,0);
|
||||
}
|
||||
if(modellist[j].children[i].name == "jiedian"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+100,modellist[j].children[i].position.z-15));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"chaijie"],modellist[j].children[i],modellist[j].name+"jiedianon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+100,modellist[j].children[i].position.z-15));
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"fuwei"],modellist[j].children[i],modellist[j].name+"jiedianoff",points2,0.5,true,0);
|
||||
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"){
|
||||
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));
|
||||
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,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(modellist[j].children[i].name == "yapian"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+100,modellist[j].children[i].position.z-25));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"chaijie"],modellist[j].children[i],modellist[j].name+"yapianon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+100,modellist[j].children[i].position.z-25));
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"fuwei"],modellist[j].children[i],modellist[j].name+"yapianoff",points2,0.5,true,0);
|
||||
}
|
||||
if(modellist[j].children[i].name == "fanghuozhao"){
|
||||
let points1 = [];
|
||||
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z+200));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"chaijie"],modellist[j].children[i],modellist[j].name+"fanghuozhaoon",points1,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"){
|
||||
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);
|
||||
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+"jiaoxingxiantieoff",points2,0.5,true,0);
|
||||
}
|
||||
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z+200));
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"fuwei"],modellist[j].children[i],modellist[j].name+"fanghuozhaooff",points2,0.5,true,0);
|
||||
}
|
||||
if(modellist[j].children[i].name == "dianyuanpian"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z-50));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"chaijie"],modellist[j].children[i],modellist[j].name+"dianyuanpianon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z-50));
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"fuwei"],modellist[j].children[i],modellist[j].name+"dianyuanpianoff",points2,0.5,true,0);
|
||||
}
|
||||
if(modellist[j].children[i].name == "xinpian"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+150,modellist[j].children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"chaijie"],modellist[j].children[i],modellist[j].name+"xinpianon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+150,modellist[j].children[i].position.z));
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"fuwei"],modellist[j].children[i],modellist[j].name+"xinpianoff",points2,0.5,true,0);
|
||||
}
|
||||
if(modellist[j].children[i].name =="jueyuanzhou"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+100,modellist[j].children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"chaijie"],modellist[j].children[i],modellist[j].name+"jueyuanzhouon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+100,modellist[j].children[i].position.z));
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"fuwei"],modellist[j].children[i],modellist[j].name+"jueyuanzhouoff",points2,0.5,true,0);
|
||||
}
|
||||
if(modellist[j].children[i].name =="cigang"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y-100,modellist[j].children[i].position.z+100));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"chaijie"],modellist[j].children[i],modellist[j].name+"cigangon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y-100,modellist[j].children[i].position.z+100));
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"fuwei"],modellist[j].children[i],modellist[j].name+"cigangoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "SZ"){
|
||||
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));
|
||||
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,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"){
|
||||
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+"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,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"){
|
||||
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+"dongjiedianzhouon",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+"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"){
|
||||
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);
|
||||
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+"jiedianoff",points2,0.5,true,0);
|
||||
|
||||
if(modellist[j].children[i].name =="ccichuihuqi"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y-50,modellist[j].children[i].position.z+100));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"chaijie"],modellist[j].children[i],modellist[j].name+"ccichuihuqion",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y-50,modellist[j].children[i].position.z+100));
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"fuwei"],modellist[j].children[i],modellist[j].name+"ccichuihuqioff",points2,0.5,true,0);
|
||||
}
|
||||
}
|
||||
if(switchmodel.children[i].name == "QDP"){
|
||||
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 = [];
|
||||
|
||||
if(modellist[j].children[i].name =="cichuihuqi"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y-50,modellist[j].children[i].position.z+100));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"chaijie"],modellist[j].children[i],modellist[j].name+"cichuihuqion",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y-50,modellist[j].children[i].position.z+100));
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"fuwei"],modellist[j].children[i],modellist[j].name+"cichuihuqioff",points2,0.5,true,0);
|
||||
}
|
||||
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);
|
||||
|
||||
if(modellist[j].children[i].name =="jiaqiangdongjiediandanyuan"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+25,modellist[j].children[i].position.z+100));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"chaijie"],modellist[j].children[i],modellist[j].name+"jiaqiangdongjiediandanyuanon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+25,modellist[j].children[i].position.z+100));
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"fuwei"],modellist[j].children[i],modellist[j].name+"jiaqiangdongjiediandanyuanoff",points2,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+"fanghuozhaooff",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+"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,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"){
|
||||
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+"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,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"){
|
||||
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));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"jueyuanzhouon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
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+"jueyuanzhouoff",points2,0.5,true,0);
|
||||
}
|
||||
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-1,switchmodel.children[i].position.y,switchmodel.children[i].position.z-5));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"cigangon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
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+"cigangoff",points2,0.5,true,0);
|
||||
}
|
||||
|
||||
if(modellist[j].children[i].name =="yunmugehupian"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
points1.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+100,modellist[j].children[i].position.z+100));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"chaijie"],modellist[j].children[i],modellist[j].name+"yunmugehupianon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y+100,modellist[j].children[i].position.z+100));
|
||||
points2.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"fuwei"],modellist[j].children[i],modellist[j].name+"yunmugehupianoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name =="CTK"){
|
||||
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+"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,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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// let points = [];
|
||||
// points.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// points.push(new THREE.Vector3(modellist[j].children[i].position.x,modellist[j].children[i].position.y,modellist[j].children[i].position.z));
|
||||
// scope.initanimate(modellist[j].children[i],modellist[j].name+"select1",points,true);
|
||||
// points.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
// 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 = [];
|
||||
|
||||
|
||||
modelorderlist[modellist[0].code] = [
|
||||
{name:"fanghuozhao",pos:[0,0,200]},
|
||||
{name:"dizuo",pos:[0,0,-150]},
|
||||
{name:"dianyuanpian",pos:[0,0,-50]},
|
||||
{name:"neibu",pos:[0,0,-25]},
|
||||
{name:"xianquan",pos:[0,-200,0]},
|
||||
{name:"Lxing",pos:[0,-150,0]},
|
||||
{name:"jiaoxingxiantie",pos:[0,-100,50]},
|
||||
{name:"zhongchuipian",pos:[0,-100,-50]},
|
||||
{name:"jiedian",pos:[0,0,100]},
|
||||
{name:"dongjiedianzhou",pos:[0,100,100]},
|
||||
{name:"jueyuanzhou",pos:[0,150,50]},
|
||||
{name:"lagan",pos:[0,150,0]},
|
||||
{name:"yapian",pos:[0,0,25]}
|
||||
];
|
||||
modelorderlist[modellist[1].code] = [
|
||||
{name:"fanghuozhao",pos:[0,0,200]},
|
||||
{name:"dizuo",pos:[0,0,-150]},
|
||||
{name:"dianyuanpian",pos:[0,0,-50]},
|
||||
{name:"neibu",pos:[0,0,-25]},
|
||||
{name:"xianquan",pos:[0,-200,0]},
|
||||
{name:"Lxing",pos:[0,-150,0]},
|
||||
{name:"jiaoxingxiantie",pos:[0,-100,50]},
|
||||
{name:"zhongchuipian",pos:[0,-100,-50]},
|
||||
{name:"jiedian",pos:[0,0,100]},
|
||||
{name:"dongjiedianzhou",pos:[0,100,100]},
|
||||
{name:"jueyuanzhou",pos:[0,150,50]},
|
||||
{name:"lagan",pos:[0,150,0]},
|
||||
{name:"yapian",pos:[0,0,25]}
|
||||
];
|
||||
modelorderlist[modellist[2].code] = [
|
||||
{name:"fanghuozhao",pos:[0,0,200]},
|
||||
{name:"dizuo",pos:[0,0,-150]},
|
||||
{name:"dianyuanpian",pos:[0,0,-50]},
|
||||
{name:"neibu",pos:[0,0,-25]},
|
||||
{name:"xianquan",pos:[0,-200,0]},
|
||||
{name:"Lxing",pos:[0,-150,0]},
|
||||
{name:"jiaoxingxiantie",pos:[0,-100,50]},
|
||||
{name:"zhongchuipian",pos:[0,-100,-50]},
|
||||
{name:"jiedian",pos:[0,0,100]},
|
||||
{name:"dongjiedianzhou",pos:[0,100,100]},
|
||||
{name:"jueyuanzhou",pos:[0,150,50]},
|
||||
{name:"lagan",pos:[0,150,0]},
|
||||
{name:"yapian",pos:[0,0,25]}
|
||||
];
|
||||
modelorderlist[modellist[3].code] = [
|
||||
{name:"fanghuozhao",pos:[0,0,200]},
|
||||
{name:"dizuo",pos:[0,0,-150]},
|
||||
{name:"dianyuanpian",pos:[0,0,-50]},
|
||||
{name:"neibu",pos:[0,0,-25]},
|
||||
{name:"xianquan",pos:[0,-200,0]},
|
||||
{name:"Lxing",pos:[0,-150,0]},
|
||||
{name:"jiaoxingxiantie",pos:[0,-100,50]},
|
||||
{name:"zhongchuipian",pos:[0,-100,-50]},
|
||||
{name:"jiedian",pos:[0,0,100]},
|
||||
{name:"dongjiedianzhou",pos:[0,100,100]},
|
||||
{name:"jueyuanzhou",pos:[0,150,50]},
|
||||
{name:"lagan",pos:[0,150,0]},
|
||||
{name:"yapian",pos:[0,0,25]}
|
||||
];
|
||||
modelorderlist[modellist[4].code] = [
|
||||
{name:"fanghuozhao",pos:[0,0,200]},
|
||||
{name:"dizuo",pos:[0,0,-150]},
|
||||
{name:"dianyuanpian",pos:[0,0,-50]},
|
||||
{name:"neibu",pos:[0,0,-25]},
|
||||
{name:"xianquan",pos:[0,-200,0]},
|
||||
{name:"Lxing",pos:[0,-150,0]},
|
||||
{name:"zhongchuipian",pos:[0,-100,-50]},
|
||||
{name:"jiaoxingxiantie",pos:[0,-100,50]},
|
||||
{name:"jiedian",pos:[0,150,100]},
|
||||
{name:"dongjiedianzhou",pos:[0,150,75]},
|
||||
{name:"jueyuanzhou",pos:[0,150,50]},
|
||||
{name:"yunmugehupian",pos:[0,100,100]},
|
||||
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:"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:"jiaqiangdongjiediandanyuan",pos:[0,75,75]},
|
||||
{name:"cichuihuqi",pos:[0,75,25]},
|
||||
{name:"lagan",pos:[0,150,0]},
|
||||
{name:"yapian1",pos:[0,0,100]},
|
||||
|
||||
{name:"yapian",pos:[0,0,10]}
|
||||
];
|
||||
modelorderlist[modellist[5].code] = [
|
||||
{name:"fanghuozhao",pos:[0,0,200]},
|
||||
{name:"dizuo",pos:[0,0,-150]},
|
||||
{name:"dianyuanpian",pos:[0,0,-50]},
|
||||
{name:"neibu",pos:[0,0,-25]},
|
||||
{name:"xianquan",pos:[0,-200,0]},
|
||||
{name:"cigang",pos:[0,-200,50]},
|
||||
{name:"Lxing",pos:[0,-150,0]},
|
||||
{name:"jiaoxingxiantie",pos:[0,-100,50]},
|
||||
{name:"zhongchuipian",pos:[0,-100,-50]},
|
||||
{name:"jiedian",pos:[0,0,100]},
|
||||
{name:"dongjiedianzhou",pos:[0,100,100]},
|
||||
{name:"jueyuanzhou",pos:[0,150,50]},
|
||||
{name:"ccichuihuqi",pos:[0,-50,75]},
|
||||
{name:"lagan",pos:[0,150,0]},
|
||||
{name:"yapian",pos:[0,0,25]}
|
||||
];
|
||||
|
||||
for(let j=0,lenj=modellist.length;j<lenj;j++){
|
||||
scope.animatelist[modellist[j].code+"on"] = [];
|
||||
scope.animatelist[modellist[j].code+"off"] = [];
|
||||
for(let i=0,leni=modelorderlist[modellist[j].code].length;i<leni;i++){
|
||||
let orderdata = modelorderlist[modellist[j].code];
|
||||
let modelon = modellist[j].getObjectByName(orderdata[i].name);
|
||||
scope.animatelist[switchmodel.animacode+"on"] = [];
|
||||
scope.animatelist[switchmodel.animacode+"off"] = [];
|
||||
for(let i=0,leni=modelorderlist[switchmodel.animacode].length;i<leni;i++){
|
||||
|
||||
let orderdata = modelorderlist[switchmodel.animacode];
|
||||
let modelon = switchmodel.getObjectByName(orderdata[i].name);
|
||||
// modelon.helpbox = undefined;
|
||||
let pointson = [];
|
||||
pointson.push(new THREE.Vector3(modelon.position.x,modelon.position.y,modelon.position.z));
|
||||
@ -516,23 +401,21 @@ export function Moveanimate(main){
|
||||
pointsoff.push(new THREE.Vector3(modelon.position.x,modelon.position.y,modelon.position.z));
|
||||
|
||||
// if(i == 0){
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"on"],modelon,modellist[j].code+modelon.name+"on",pointson,0.01,true,i);
|
||||
scope.initanimate(scope.animatelist[modellist[j].code+"off"],modelon,modellist[j].code+modelon.name+"off",pointsoff,0.01,true,leni-i-1);
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"on"],modelon,switchmodel.animacode+modelon.name+"on",pointson,0.01,true,i);
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"off"],modelon,switchmodel.animacode+modelon.name+"off",pointsoff,0.01,true,leni-i-1);
|
||||
// }else if((i+1)<leni){
|
||||
// scope.initanimate(modelon,modellist[j].code+modelon.name+"on",pointson,0.01,true,modellist[j].code+orderdata[i+1].name+"on");
|
||||
// scope.initanimate(modelon,modellist[j].code+modelon.name+"off",pointsoff,0.01,true,modellist[j].code+orderdata[i-1].name+"off");
|
||||
// scope.initanimate(modelon,switchmodel.animacode+modelon.name+"on",pointson,0.01,true,switchmodel.animacode+orderdata[i+1].name+"on");
|
||||
// scope.initanimate(modelon,switchmodel.animacode+modelon.name+"off",pointsoff,0.01,true,switchmodel.animacode+orderdata[i-1].name+"off");
|
||||
// }else{
|
||||
// scope.initanimate(modelon,modellist[j].code+modelon.name+"on",pointson,0.01,true);
|
||||
// scope.initanimate(modelon,modellist[j].code+modelon.name+"off",pointsoff,0.01,true,modellist[j].code+orderdata[i-1].name+"off");
|
||||
// scope.initanimate(modelon,switchmodel.animacode+modelon.name+"on",pointson,0.01,true);
|
||||
// scope.initanimate(modelon,switchmodel.animacode+modelon.name+"off",pointsoff,0.01,true,switchmodel.animacode+orderdata[i-1].name+"off");
|
||||
// }
|
||||
|
||||
// if(modellist[j].children[i].name == "xinpian"){
|
||||
// if(switchmodel.children[i].name == "xinpian"){
|
||||
// }
|
||||
// if(modellist[j].children[i].name =="cigang"){
|
||||
// if(switchmodel.children[i].name =="cigang"){
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//动画对象定义
|
||||
this.initanimate = function(list,modelobject,name,points,speed,type,nextname){
|
||||
|
@ -19,7 +19,6 @@ export function Textconfig(){
|
||||
}
|
||||
|
||||
for(let i=0,leni=selectmodel.children.length;i<leni;i++){
|
||||
console.log(selectmodel.children[i].name);
|
||||
let part= {
|
||||
name:selectmodel.children[i].name,
|
||||
text:null,
|
||||
@ -111,8 +110,10 @@ export function Textconfig(){
|
||||
// if(part.text == null){
|
||||
// console.log(selectmodel.children[i].name);
|
||||
// }
|
||||
if(part.text){
|
||||
scope.devicelist.push(part);
|
||||
}
|
||||
|
||||
scope.devicelist.push(part);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@ var Staticmodel = {
|
||||
deviceType: "Switch",
|
||||
type: "fuzhou",
|
||||
picUrl: "",
|
||||
assetUrl: "./../static/model/device/switch/DX.FBX"
|
||||
assetUrl: "./../static/model/device/switch/ZD6D.FBX"
|
||||
},//"https://joylink.club/oss/wx/switch/switch.FBX"
|
||||
//../../static/model/device/switch.FBX
|
||||
Signal: {
|
||||
|
@ -22,8 +22,20 @@ export function Jl3ddeviceNew(dom,group,token) {
|
||||
this.mixers = [];
|
||||
this.showmodel = null;
|
||||
|
||||
let helpbox,textplane;
|
||||
let daochamodel;
|
||||
//点击事件状态
|
||||
this.raycasterstatus = false;
|
||||
//动画状态
|
||||
this.animastats = false;
|
||||
//当前选中模型
|
||||
this.nowobject = null;
|
||||
//当前动画播放模型
|
||||
this.animationmodel = null;
|
||||
|
||||
this.devicetext = new Textconfig();
|
||||
|
||||
this.windowstatus = '0';
|
||||
|
||||
//初始化webgl渲染
|
||||
this.renderer = new THREE.WebGLRenderer({ antialias: true });
|
||||
@ -36,7 +48,7 @@ export function Jl3ddeviceNew(dom,group,token) {
|
||||
|
||||
//定义相机
|
||||
|
||||
this.camera = new THREE.PerspectiveCamera(70, dom.offsetWidth / dom.offsetHeight, 0.01, 120);
|
||||
this.camera = new THREE.PerspectiveCamera(70, dom.offsetWidth / dom.offsetHeight, 0.01, 200);
|
||||
this.camera.position.set(0, 20, 30);
|
||||
this.camera.aspect = dom.offsetWidth / dom.offsetHeight;
|
||||
this.camera.updateProjectionMatrix();
|
||||
@ -54,17 +66,18 @@ export function Jl3ddeviceNew(dom,group,token) {
|
||||
grid.material.transparent = true;
|
||||
this.scene.add(grid);
|
||||
|
||||
let moveanima = new Moveanimate(scope);
|
||||
|
||||
//定义全局光
|
||||
let ambientLight = new THREE.AmbientLight(0xffffff, 1.3);
|
||||
this.scene.add(ambientLight);
|
||||
|
||||
|
||||
var spotLight = new THREE.SpotLight(0xffffff);
|
||||
spotLight.position.set(-50, 60, 15);
|
||||
var spotLight = new THREE.SpotLight(0xececff);
|
||||
spotLight.position.set(-50, 80, 0);
|
||||
spotLight.castShadow = true;
|
||||
spotLight.shadow.mapSize.width = 1024;
|
||||
spotLight.shadow.mapSize.height = 1024;
|
||||
spotLight.shadow.mapSize.width = 2048;
|
||||
spotLight.shadow.mapSize.height = 2048;
|
||||
this.scene.add(spotLight);
|
||||
|
||||
|
||||
@ -76,6 +89,9 @@ export function Jl3ddeviceNew(dom,group,token) {
|
||||
this.controls.screenSpacePanning = true;
|
||||
this.controls.update();
|
||||
|
||||
|
||||
document.addEventListener( "mousedown", onselect, false );
|
||||
|
||||
let teststomp = new StompClient();
|
||||
// let topic = '/user/topic/simulation/assistant/'+group;
|
||||
let topic = '/user/queue/simulation/jl3d/'+group;
|
||||
@ -119,7 +135,8 @@ export function Jl3ddeviceNew(dom,group,token) {
|
||||
|
||||
this.modelmanager = new ModelManager();
|
||||
this.modelmanager.loadpromise(Staticmodel, scope.mixers).then(function (data) {
|
||||
console.log(scope.modelmanager);
|
||||
moveanima.initlistnew(scope.modelmanager.switchmodel.mesh);
|
||||
daochamodel = scope.modelmanager.switchmodel.mesh.getObjectByName("DAOCHA");
|
||||
animate();
|
||||
})
|
||||
|
||||
@ -131,6 +148,7 @@ export function Jl3ddeviceNew(dom,group,token) {
|
||||
scope.controls.update();
|
||||
//scope.camera.lookAt(plane);
|
||||
//
|
||||
moveanima.animateupdate();
|
||||
let delta = clock.getDelta();
|
||||
if (scope.mixers) {
|
||||
for (let i = 0; i < scope.mixers.length; i++) {
|
||||
@ -141,6 +159,14 @@ export function Jl3ddeviceNew(dom,group,token) {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
this.hideswitch = function (nowswitchstatus){
|
||||
if(nowswitchstatus){
|
||||
scope.modelmanager.switchmodel.mesh.add(daochamodel);
|
||||
}else{
|
||||
scope.modelmanager.switchmodel.mesh.remove(daochamodel);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
this.selectmodel = function (data) {
|
||||
@ -150,17 +176,26 @@ export function Jl3ddeviceNew(dom,group,token) {
|
||||
scope.scene.remove(scope.showmodel);
|
||||
scope.showmodel = null
|
||||
scope.nowcode = data.code;
|
||||
|
||||
if (data._type == "Switch") {
|
||||
// scope.modelmanager.switchmodel.locateType = data.body.locateType;
|
||||
scope.modelmanager.switchmodel.code = data.code;
|
||||
scope.showmodel = scope.modelmanager.switchmodel.mesh;
|
||||
scope.scene.add(scope.showmodel);
|
||||
scope.devicetext.initdevicetext(scope.modelmanager.switchmodel.mesh);
|
||||
scope.nowobject = scope.modelmanager.switchmodel.mesh;
|
||||
updatemenulist(scope.devicetext.devicelist);
|
||||
scope.raycasterstatus = true;
|
||||
}else{
|
||||
scope.raycasterstatus = false;
|
||||
scope.nowobject = "";
|
||||
updatemenulist();
|
||||
}
|
||||
if (data._type == "Signal") {
|
||||
scope.modelmanager.signalmodel.code = data.code;
|
||||
scope.showmodel = scope.modelmanager.signalmodel.mesh;
|
||||
scope.scene.add(scope.showmodel);
|
||||
|
||||
}
|
||||
|
||||
if (data._type == "Psd") {
|
||||
@ -170,6 +205,7 @@ export function Jl3ddeviceNew(dom,group,token) {
|
||||
scope.scene.add(scope.showmodel);
|
||||
}
|
||||
if(scope.showmodel){
|
||||
scope.resetmodel();
|
||||
scope.showmodel.code = data.code;
|
||||
initstatus(data);
|
||||
}
|
||||
@ -216,6 +252,78 @@ export function Jl3ddeviceNew(dom,group,token) {
|
||||
|
||||
}
|
||||
|
||||
//设备分解、归位动画按钮
|
||||
this.disperdevice1 = function(){
|
||||
if(scope.nowobject.animacode){
|
||||
if(moveanima.status == true){
|
||||
if(scope.animastats == false){
|
||||
scope.animastats = true;
|
||||
moveanima.setplaylist(moveanima.animatelist[scope.nowobject.animacode+"on"],true)
|
||||
} else if(scope.animastats == true){
|
||||
scope.animastats = false;
|
||||
moveanima.setplaylist(moveanima.animatelist[scope.nowobject.animacode+"off"],true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
this.disperdevice2 = function(){
|
||||
if(scope.nowobject.animacode){
|
||||
if(moveanima.status == true){
|
||||
if(scope.animastats == false){
|
||||
scope.animastats = true;
|
||||
moveanima.setplaylist(moveanima.animatelist[scope.nowobject.animacode+"chaijie"],true);
|
||||
} else if(scope.animastats == true){
|
||||
scope.animastats = false;
|
||||
moveanima.setplaylist(moveanima.animatelist[scope.nowobject.animacode+"fuwei"],true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
this.resetmodel = function(){
|
||||
if(scope.nowobject.animacode){
|
||||
scope.animastats = false;
|
||||
moveanima.setplaylist(moveanima.animatelist[scope.nowobject.animacode+"fuwei"],true);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
this.animationmsgshowon = function(nowobject){
|
||||
scope.animationmodel = nowobject;
|
||||
if(helpbox){
|
||||
scope.animationmodel.helpbox = null;
|
||||
scope.scene.remove( helpbox );
|
||||
helpbox = undefined;
|
||||
}
|
||||
|
||||
settext(scope.animationmodel,scope.animationmodel.position);
|
||||
// console.log(scope.animationmodel);
|
||||
helpbox = new THREE.BoxHelper( scope.animationmodel, 0xff0000 );
|
||||
moveanima.updatehelpbox(helpbox,textplane);
|
||||
// settext(intersects[0].object,intersects[0].point);
|
||||
// getdevicemsg(intersects[0].object.name);
|
||||
scope.scene.add( helpbox );
|
||||
getdevicemsg(nowobject.name);
|
||||
}
|
||||
|
||||
this.animationmsgshowoff = function(nowobject){
|
||||
if(helpbox){
|
||||
scope.animationmodel.helpbox = null;
|
||||
scope.scene.remove( helpbox );
|
||||
helpbox = undefined;
|
||||
}
|
||||
if(textplane){
|
||||
scope.scene.remove(textplane);
|
||||
textplane.geometry.dispose();
|
||||
textplane.material.dispose();
|
||||
}
|
||||
scope.animationmodel = null;
|
||||
}
|
||||
|
||||
this.updateaction = function (data) {
|
||||
if (data.type == "SWITCH") {
|
||||
if (data.normal == "0") {
|
||||
@ -283,6 +391,35 @@ export function Jl3ddeviceNew(dom,group,token) {
|
||||
// scope.showmodel.
|
||||
}
|
||||
|
||||
this.updateselect = function(updata){
|
||||
// console.log(updata);
|
||||
if(helpbox){
|
||||
scope.scene.remove( helpbox );
|
||||
helpbox = null;
|
||||
}
|
||||
helpbox = new THREE.BoxHelper( updata.mesh, 0xff0000 );
|
||||
// console.log(updata.mesh);
|
||||
let point = {
|
||||
x:updata.mesh.matrixWorld.elements[12],
|
||||
y:updata.mesh.matrixWorld.elements[13],
|
||||
z:updata.mesh.matrixWorld.elements[14]
|
||||
};
|
||||
settext(updata.mesh,point)
|
||||
getdevicemsg(updata.mesh.name);
|
||||
scope.scene.add( helpbox );
|
||||
}
|
||||
|
||||
function getdevicemsg(selectname){
|
||||
// console.log(selectname);
|
||||
for(let i=0,leni=scope.devicetext.devicelist.length;i<leni;i++){
|
||||
|
||||
if(selectname == scope.devicetext.devicelist[i].name){
|
||||
updatemsg(scope.devicetext.devicelist[i].text,scope.devicetext.devicelist[i].msg);
|
||||
i=leni;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function initstatus(data) {
|
||||
if (data._type == "Switch") {
|
||||
if (data.normalPosition == "0") {
|
||||
@ -361,51 +498,101 @@ export function Jl3ddeviceNew(dom,group,token) {
|
||||
}
|
||||
|
||||
}
|
||||
this.updatewindowstatus = function(nowwindowstatus){
|
||||
scope.windowstatus == nowwindowstatus;
|
||||
}
|
||||
function onselect(event){
|
||||
if(event.button == '0'){
|
||||
|
||||
function settext(intersects,point){
|
||||
if(scope.status == '1'){
|
||||
if(intersects.text){
|
||||
let textgeometry = new THREE.PlaneBufferGeometry( 300, 200, 1 );
|
||||
let textt = new THREE.CanvasTexture(getTextCanvas(intersects.text));
|
||||
let textmaterial = new THREE.MeshBasicMaterial( {
|
||||
side: THREE.DoubleSide,
|
||||
map:textt ,transparent: true,
|
||||
alphaTest:0.1
|
||||
} );
|
||||
if(scope.raycasterstatus){
|
||||
|
||||
//定义光线
|
||||
let raycaster = new THREE.Raycaster();
|
||||
//定义平面鼠标点击坐标
|
||||
let mouse = new THREE.Vector2();
|
||||
let getBoundingClientRect = scope.dom.getBoundingClientRect()
|
||||
if(scope.windowstatus == '0'){
|
||||
mouse.x = ( (event.clientX - getBoundingClientRect .left) /scope.dom.offsetWidth) * 2-1;
|
||||
mouse.y = -( (event.clientY - getBoundingClientRect .top) / scope.dom.offsetHeight) * 2 + 1;
|
||||
}else{
|
||||
mouse.x = (event.clientX / scope.dom.offsetWidth) * 2 - 1;
|
||||
mouse.y = -(event.clientY / scope.dom.offsetHeight) * 2 + 1;
|
||||
}
|
||||
|
||||
raycaster.setFromCamera( mouse, scope.camera );
|
||||
|
||||
|
||||
let intersects = raycaster.intersectObjects( scope.modelmanager.switchmodel.mesh.children,true);
|
||||
if(helpbox){
|
||||
scope.scene.remove( helpbox );
|
||||
helpbox = null;
|
||||
}
|
||||
if(textplane){
|
||||
scene.remove(textplane);
|
||||
scope.scene.remove(textplane);
|
||||
textplane.geometry.dispose();
|
||||
textplane.material.dispose();
|
||||
}
|
||||
textplane= new THREE.Mesh( textgeometry, textmaterial );
|
||||
// textplane.name = data[i].code;
|
||||
textplane.position.x = point.x;
|
||||
textplane.position.y = point.y+100;
|
||||
textplane.position.z = point.z;
|
||||
// console.log(textplane.position);
|
||||
// textplane.tcode = data[i].code;
|
||||
textplane.rotation.y = -Math.PI/2;
|
||||
textplane.lookAt(camera.position);
|
||||
// scope.textlist.push(textplane);
|
||||
// newmesh.children[0].add(textplane);
|
||||
if(intersects[0]){
|
||||
|
||||
scene.add(textplane);
|
||||
|
||||
textgeometry.dispose();
|
||||
textmaterial.dispose();
|
||||
textt.dispose();
|
||||
if(intersects[0].object.raycastoff){
|
||||
helpbox = new THREE.BoxHelper( intersects[0].object.parent, 0xff0000 );
|
||||
settext(intersects[0].object.parent,intersects[0].point);
|
||||
getdevicemsg(intersects[0].object.parent.name);
|
||||
|
||||
}else{
|
||||
helpbox = new THREE.BoxHelper( intersects[0].object, 0xff0000 );
|
||||
settext(intersects[0].object,intersects[0].point);
|
||||
getdevicemsg(intersects[0].object.name);
|
||||
|
||||
}
|
||||
|
||||
scope.scene.add( helpbox );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function settext(intersects,point){
|
||||
if(intersects.text){
|
||||
let textgeometry = new THREE.PlaneBufferGeometry( 18, 12, 1 );
|
||||
let textt = new THREE.CanvasTexture(getTextCanvas(intersects.text));
|
||||
let textmaterial = new THREE.MeshBasicMaterial( {
|
||||
side: THREE.DoubleSide,
|
||||
map:textt ,transparent: true,
|
||||
alphaTest:0.1
|
||||
} );
|
||||
if(textplane){
|
||||
scope.scene.remove(textplane);
|
||||
textplane.geometry.dispose();
|
||||
textplane.material.dispose();
|
||||
}
|
||||
textplane= new THREE.Mesh( textgeometry, textmaterial );
|
||||
// textplane.name = data[i].code;
|
||||
textplane.position.x = point.x;
|
||||
textplane.position.y = point.y+6;
|
||||
textplane.position.z = point.z;
|
||||
// console.log(textplane.position);
|
||||
// textplane.tcode = data[i].code;
|
||||
textplane.rotation.y = -Math.PI/2;
|
||||
textplane.lookAt(scope.camera.position);
|
||||
// scope.textlist.push(textplane);
|
||||
// newmesh.children[0].add(textplane);
|
||||
|
||||
scope.scene.add(textplane);
|
||||
|
||||
textgeometry.dispose();
|
||||
textmaterial.dispose();
|
||||
textt.dispose();
|
||||
}
|
||||
}
|
||||
var beauty = new Image();
|
||||
beauty.src = "../../static/texture/guide.png";
|
||||
//canvas文字贴图方法
|
||||
//PS:待提炼 增强功能
|
||||
function getTextCanvas(text){
|
||||
if(scope.status == '1'){
|
||||
var canvas = document.getElementById('canvastexture');
|
||||
|
||||
canvas.width = 256;
|
||||
@ -429,7 +616,6 @@ export function Jl3ddeviceNew(dom,group,token) {
|
||||
//ctx.fillText(text.trainModel.name, width/2,height*3/4);
|
||||
let data = ctx.getImageData(0, 0,256, 128);
|
||||
return data;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -4,14 +4,14 @@ export function ModelManager(){
|
||||
let scope = this;
|
||||
|
||||
this.switchmodel = {
|
||||
code:null,
|
||||
code:"switch",
|
||||
locateType:"01",
|
||||
mesh:null,
|
||||
action:null
|
||||
};
|
||||
|
||||
this.signalmodel = {
|
||||
code:null,
|
||||
code:"signal",
|
||||
lightType:"01",
|
||||
status:"01",
|
||||
switchLocateType:"01",
|
||||
@ -20,12 +20,12 @@ export function ModelManager(){
|
||||
};
|
||||
|
||||
this.standmodel = {
|
||||
code:null,
|
||||
code:"stand",
|
||||
screenDoorOpenStatus:"01",
|
||||
mesh:null,
|
||||
action:null
|
||||
};
|
||||
|
||||
|
||||
this.loadpromise = function (data,mixers){
|
||||
let initlist = [];
|
||||
initlist.push(fbxpromise(data.Switch,mixers,scope.switchmodel));
|
||||
@ -56,7 +56,7 @@ function fbxpromise(asset,mixers,model){
|
||||
child.receiveShadow = true;
|
||||
}
|
||||
} );
|
||||
|
||||
object.animacode = model.code;
|
||||
model.mesh = object;
|
||||
if(object.animations.length>0){
|
||||
|
||||
|
@ -1,23 +1,20 @@
|
||||
<template>
|
||||
<div class="editassets">
|
||||
<div class="asset-list">
|
||||
<el-tabs style="margin:5px" v-model="activeName">
|
||||
|
||||
<el-tab-pane class="displayscrol" label="设备部件" name="train">
|
||||
<el-scrollbar ref="devicescrol" style="height:100%;margin-bottom:1px">
|
||||
<el-form ref="form" label-width="120px" size="mini">
|
||||
<div class="displaylist" v-for="(part,index) in devicelist" @click="deviceselect(index,part)" v-show="true" >
|
||||
<div >
|
||||
<p style="border:1px solid #000;">设备名称:{{part.text}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
</el-tab-pane>
|
||||
<!-- <el-tabs v-model="activeName"> -->
|
||||
<div class="devicelisttop">
|
||||
<p style="font-size:20px;color:#FFFFFF;">设备部件</p>
|
||||
</div>
|
||||
<div class="devicelistbottom">
|
||||
<div class="displaylist " v-for="(part,index) in devicelist" @click="deviceselect(index,part)" v-show="true" >
|
||||
<div >
|
||||
<p style="border:1px solid #FFFFFF;">{{part.text}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</el-tabs>
|
||||
<!-- </el-tabs> -->
|
||||
</div>
|
||||
|
||||
|
||||
@ -54,10 +51,6 @@ export default {
|
||||
this.$refs.tree2.filter(val);
|
||||
},
|
||||
|
||||
'devicelist.length':function(newVal){
|
||||
this.$refs.devicescrol.update()
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
@ -89,46 +82,56 @@ export default {
|
||||
.editassets {
|
||||
position: absolute;
|
||||
float:right;
|
||||
right:0;
|
||||
right:2%;
|
||||
top:10%;
|
||||
width: 20%;
|
||||
height: 90%;
|
||||
background-color: #FFFFFF;
|
||||
// background-image:url("/static/texture/menu.png");
|
||||
// background-repeat: no-repeat;
|
||||
// background-size: 100%;
|
||||
height: 80%;
|
||||
// background-color: #FFFFFF;
|
||||
|
||||
// border-radius:5px;
|
||||
background-image:url("/static/texture/devicelistpane.png");
|
||||
background-repeat: no-repeat;
|
||||
overflow: hidden;
|
||||
background-size:90% 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.asset-list{
|
||||
position:absolute;
|
||||
left:0;
|
||||
width: 90%;
|
||||
// position:absolute;
|
||||
|
||||
width: 85%;
|
||||
height: 100%;
|
||||
left: 5px;
|
||||
top: 15px;
|
||||
|
||||
|
||||
|
||||
}
|
||||
.default-scrollbar {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.el-tabs{
|
||||
height:100%;
|
||||
}
|
||||
|
||||
.el-scrollbar__wrap.default-scrollbar__wrap {
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.el-scrollbar__view.default-scrollbar__view {}
|
||||
.displayscrol{
|
||||
|
||||
height: 100%;
|
||||
.devicelisttop{
|
||||
height:10%;
|
||||
width:100%;
|
||||
top:0;
|
||||
}
|
||||
.devicelistbottom{
|
||||
height:85%;
|
||||
width:100%;
|
||||
top:10%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.displaylist {
|
||||
float:left;
|
||||
position: relative;
|
||||
width:80%;
|
||||
height:20px;
|
||||
margin:0px 0px 20px 0px;
|
||||
width:90px;
|
||||
// height:20px;
|
||||
font-size:19px;
|
||||
color:#FFFFFF;
|
||||
margin:0px 5px 0px 5px;
|
||||
|
||||
}
|
||||
.modelpic{
|
||||
|
@ -58,23 +58,24 @@ export default {
|
||||
.showmsg{
|
||||
position: absolute;
|
||||
float:left;
|
||||
left:0;
|
||||
bottom:0;
|
||||
left:2%;
|
||||
bottom:15%;
|
||||
width: 20%;
|
||||
height: 40%;
|
||||
height: 70%;
|
||||
z-index: 10;
|
||||
background-image:url("/static/texture/showmsg.png");
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100%;
|
||||
background-image:url("/static/texture/devicemsgpane.png");
|
||||
background-repeat:no-repeat;
|
||||
background-size: 90% 100%;
|
||||
|
||||
}
|
||||
.msgtop{
|
||||
text-align: center;
|
||||
width: 90%;
|
||||
width: 80%;
|
||||
height:10%;
|
||||
float: left;
|
||||
position: absolute;
|
||||
top:10%;
|
||||
font-size:30px;
|
||||
font-size:20px;
|
||||
color:#FFFFFF;
|
||||
}
|
||||
|
||||
@ -82,12 +83,14 @@ export default {
|
||||
position: absolute;
|
||||
top:20%;
|
||||
left:5%;
|
||||
width: 90%;
|
||||
height:80%;
|
||||
font-size:20px;
|
||||
width: 80%;
|
||||
height:75%;
|
||||
float: left;
|
||||
font-size:19px;
|
||||
color:#FFFFFF;
|
||||
word-wrap:break-word;
|
||||
letter-spacing:2px;
|
||||
overflow-y:scroll;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -1,10 +1,18 @@
|
||||
<template>
|
||||
<div id="jl3d" class="jl3ddraw">
|
||||
<Jl3ddevice-Msg>
|
||||
<Jl3ddevice-Msg v-show="isswitch">
|
||||
</Jl3ddevice-Msg>
|
||||
<Jl3ddevice-List :devicelist="devicelist" @sdevice="sdevice">
|
||||
<Jl3ddevice-List v-show="isswitch" :devicelist="devicelist" @sdevice="sdevice">
|
||||
</Jl3ddevice-List>
|
||||
<canvas id="canvastexture" />
|
||||
<div class="jl3dcontrolpane" v-show="isswitch">
|
||||
<el-button-group>
|
||||
<el-button type="primary" @click="back">初始化</el-button>
|
||||
<el-button type="primary" @click="alldisper">{{disperreset}}</el-button>
|
||||
<el-button type="primary" @click="dispersed">{{devicestats}}</el-button>
|
||||
<el-button type="primary" @click="switchhide">{{switchshow}}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<div id="jl3dwindow" class="windowbutton" @click="windowchange"></div>
|
||||
<div id="jl3dclose" class="backbutton" @click="close3ddeviceview"></div>
|
||||
</div>
|
||||
@ -28,12 +36,31 @@
|
||||
jl3d: null,
|
||||
psdlist:this.$store.state.map.map.psdList,
|
||||
windowstatus:false,
|
||||
|
||||
devicelist:[],
|
||||
|
||||
devicestats:"分步拆解",
|
||||
disperreset:"整体拆解",
|
||||
switchshow:"隐藏轨道",
|
||||
switchstatus:true,
|
||||
isswitch:false,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'jl3d.animastats': {
|
||||
handler: function (newVal, oldVal) {
|
||||
if (newVal != oldVal) {
|
||||
if(newVal == false){
|
||||
this.devicestats = "分步拆解";
|
||||
|
||||
this.disperreset = "整体拆解";
|
||||
}
|
||||
if(newVal == true){
|
||||
this.devicestats = "分步复位";
|
||||
|
||||
this.disperreset = "整体复位";
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount': {
|
||||
handler: function (newVal, oldVal) {
|
||||
if (newVal != oldVal) {
|
||||
@ -77,7 +104,7 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
window.updatemenulist = this.updatemenulist;
|
||||
|
||||
let code = this.$route.query.code;
|
||||
let group = this.$route.query.group;
|
||||
@ -112,24 +139,54 @@
|
||||
windowchange: function(){
|
||||
let changeelement = document.getElementById('jl3d');
|
||||
if(this.windowstatus){
|
||||
changeelement.style.width = '40%';
|
||||
changeelement.style.height = '60%';
|
||||
changeelement.style.top = '20%';
|
||||
changeelement.style.width = '50%';
|
||||
changeelement.style.height = '50%';
|
||||
changeelement.style.top = '25%';
|
||||
this.windowstatus = false;
|
||||
this.jl3d.updatewindowstatus('0');
|
||||
}else{
|
||||
changeelement.style.width = '100%';
|
||||
changeelement.style.height = '100%';
|
||||
changeelement.style.top = '0';
|
||||
this.windowstatus = true;
|
||||
this.jl3d.updatewindowstatus('1');
|
||||
}
|
||||
if(this.jl3d.domresize){
|
||||
this.jl3d.domresize();
|
||||
}
|
||||
},
|
||||
updatemenulist(devicelist) {
|
||||
if(devicelist){
|
||||
this.devicelist = devicelist;
|
||||
this.isswitch = true;
|
||||
}else{
|
||||
this.devicelist = [];
|
||||
this.isswitch = false;
|
||||
}
|
||||
|
||||
},
|
||||
sdevice(changedata) {
|
||||
|
||||
// this.jl3d.updateselect(changedata);
|
||||
|
||||
this.jl3d.updateselect(changedata);
|
||||
},
|
||||
dispersed(){
|
||||
this.jl3d.disperdevice1();
|
||||
},
|
||||
alldisper(){
|
||||
this.jl3d.disperdevice2();
|
||||
},
|
||||
back(){
|
||||
this.jl3d.resetmodel();
|
||||
},
|
||||
switchhide(){
|
||||
if(this.switchstatus){
|
||||
this.switchstatus = false;
|
||||
this.switchshow = "显示轨道";
|
||||
this.jl3d.hideswitch(this.switchstatus);
|
||||
}else{
|
||||
this.switchstatus = true;
|
||||
this.switchshow = "隐藏轨道";
|
||||
this.jl3d.hideswitch(this.switchstatus);
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
@ -143,10 +200,10 @@
|
||||
.jl3ddraw {
|
||||
position: absolute;
|
||||
float: right;
|
||||
top:20%;
|
||||
top:25%;
|
||||
/* left: 0; */
|
||||
width: 40%;
|
||||
height: 60%;
|
||||
width: 50%;
|
||||
height: 50%;
|
||||
z-index: 1500;
|
||||
}
|
||||
|
||||
@ -161,17 +218,21 @@
|
||||
width:25px;
|
||||
height:25px;
|
||||
position: absolute;
|
||||
right:40px;
|
||||
right:60px;
|
||||
top:5px;
|
||||
background-color:#00ff00;
|
||||
background-image:url("/static/texture/fk.png");
|
||||
background-repeat:no-repeat;
|
||||
background-size:100%;
|
||||
}
|
||||
.backbutton{
|
||||
width:25px;
|
||||
height:25px;
|
||||
position: absolute;
|
||||
right:10px;
|
||||
right:15px;
|
||||
top:5px;
|
||||
background-color:#ffff00;
|
||||
background-image:url("/static/texture/xx.png");
|
||||
background-repeat:no-repeat;
|
||||
background-size:100%;
|
||||
}
|
||||
|
||||
#canvastexture {
|
||||
@ -180,6 +241,10 @@
|
||||
left: 0;
|
||||
z-index: -12;
|
||||
}
|
||||
|
||||
.jl3dcontrolpane{
|
||||
position: absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
Binary file not shown.
BIN
static/model/device/switch/ZD6D.FBX
Normal file
BIN
static/model/device/switch/ZD6D.FBX
Normal file
Binary file not shown.
BIN
static/texture/devicelistpane.png
Normal file
BIN
static/texture/devicelistpane.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
BIN
static/texture/devicemsgpane.png
Normal file
BIN
static/texture/devicemsgpane.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
BIN
static/texture/fk.png
Normal file
BIN
static/texture/fk.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.1 KiB |
BIN
static/texture/xx.png
Normal file
BIN
static/texture/xx.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
Loading…
Reference in New Issue
Block a user