修改三维单体设备屏蔽门,增加拆解逻辑
This commit is contained in:
parent
b27ca87efd
commit
0e2ee25cb6
@ -14,176 +14,331 @@ export function Moveanimate(main){
|
|||||||
this.status = true;
|
this.status = true;
|
||||||
//当前动画模型
|
//当前动画模型
|
||||||
this.nowmodelname = undefined;
|
this.nowmodelname = undefined;
|
||||||
|
|
||||||
|
//定义屏蔽门零件动画
|
||||||
|
|
||||||
|
this.initDoorAnima = function(animaModel){
|
||||||
|
scope.animatelist[animaModel.animacode+"chaijie"] = [];
|
||||||
|
scope.animatelist[animaModel.animacode+"fuwei"] = [];
|
||||||
|
for(let i=0,leni=animaModel.children.length;i<leni;i++){
|
||||||
|
if(animaModel.children[i].name == "SJZZ"){
|
||||||
|
let points1 = [];
|
||||||
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y+4,animaModel.children[i].position.z+10));
|
||||||
|
scope.initanimate(scope.animatelist[animaModel.animacode+"chaijie"],animaModel.children[i],animaModel.name+"dizuoon",points1,0.5,true,0);
|
||||||
|
let points2 = [];
|
||||||
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y+4,animaModel.children[i].position.z+10));
|
||||||
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
|
scope.initanimate(scope.animatelist[animaModel.animacode+"fuwei"],animaModel.children[i],animaModel.name+"dizuooff",points2,0.5,true,0);
|
||||||
|
}
|
||||||
|
if(animaModel.children[i].name == "HLGJZ"){
|
||||||
|
let points1 = [];
|
||||||
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y+4,animaModel.children[i].position.z+8));
|
||||||
|
scope.initanimate(scope.animatelist[animaModel.animacode+"chaijie"],animaModel.children[i],animaModel.name+"Lxingon",points1,0.5,true,0);
|
||||||
|
let points2 = [];
|
||||||
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y+4,animaModel.children[i].position.z+8));
|
||||||
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
|
scope.initanimate(scope.animatelist[animaModel.animacode+"fuwei"],animaModel.children[i],animaModel.name+"Lxingoff",points2,0.5,true,0);
|
||||||
|
}
|
||||||
|
if(animaModel.children[i].name == "HLGJY"){
|
||||||
|
let points1 = [];
|
||||||
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y+4,animaModel.children[i].position.z+8));
|
||||||
|
scope.initanimate(scope.animatelist[animaModel.animacode+"chaijie"],animaModel.children[i],animaModel.name+"jiaoxingxiantieon",points1,0.5,true,0);
|
||||||
|
let points2 = [];
|
||||||
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y+4,animaModel.children[i].position.z+8));
|
||||||
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
|
scope.initanimate(scope.animatelist[animaModel.animacode+"fuwei"],animaModel.children[i],animaModel.name+"jiaoxingxiantieoff",points2,0.5,true,0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(animaModel.children[i].name == "PDJ"){
|
||||||
|
let points1 = [];
|
||||||
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y+4,animaModel.children[i].position.z+6));
|
||||||
|
scope.initanimate(scope.animatelist[animaModel.animacode+"chaijie"],animaModel.children[i],animaModel.name+"zhongchuipianon",points1,0.5,true,0);
|
||||||
|
let points2 = [];
|
||||||
|
points2.push(new THREE.Vector3(animaModel.children[i].position.xx,animaModel.children[i].position.y+4,animaModel.children[i].position.z+6));
|
||||||
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
|
scope.initanimate(scope.animatelist[animaModel.animacode+"fuwei"],animaModel.children[i],animaModel.name+"zhongchuipianoff",points2,0.5,true,0);
|
||||||
|
}
|
||||||
|
if(animaModel.children[i].name == "PDJ1"){
|
||||||
|
let points1 = [];
|
||||||
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y+4,animaModel.children[i].position.z+6));
|
||||||
|
scope.initanimate(scope.animatelist[animaModel.animacode+"chaijie"],animaModel.children[i],animaModel.name+"laganon",points1,0.5,true,0);
|
||||||
|
let points2 = [];
|
||||||
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y+4,animaModel.children[i].position.z+6));
|
||||||
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
|
scope.initanimate(scope.animatelist[animaModel.animacode+"fuwei"],animaModel.children[i],animaModel.name+"laganoff",points2,0.5,true,0);
|
||||||
|
}
|
||||||
|
if(animaModel.children[i].name == "HLZZZ"){
|
||||||
|
let points1 = [];
|
||||||
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y+4,animaModel.children[i].position.z+4));
|
||||||
|
scope.initanimate(scope.animatelist[animaModel.animacode+"chaijie"],animaModel.children[i],animaModel.name+"dongjiedianzhouon",points1,0.5,true,0);
|
||||||
|
let points2 = [];
|
||||||
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y+4,animaModel.children[i].position.z+4));
|
||||||
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
|
scope.initanimate(scope.animatelist[animaModel.animacode+"fuwei"],animaModel.children[i],animaModel.name+"dongjiedianzhouoff",points2,0.5,true,0);
|
||||||
|
}
|
||||||
|
if(animaModel.children[i].name == "HLZZY"){
|
||||||
|
let points1 = [];
|
||||||
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y+4,animaModel.children[i].position.z+4));
|
||||||
|
scope.initanimate(scope.animatelist[animaModel.animacode+"chaijie"],animaModel.children[i],animaModel.name+"neibuon",points1,0.5,true,0);
|
||||||
|
let points2 = [];
|
||||||
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y+4,animaModel.children[i].position.z+4));
|
||||||
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
|
scope.initanimate(scope.animatelist[animaModel.animacode+"fuwei"],animaModel.children[i],animaModel.name+"neibuoff",points2,0.5,true,0);
|
||||||
|
}
|
||||||
|
if(animaModel.children[i].name == "CLPD"){
|
||||||
|
let points1 = [];
|
||||||
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y+6,animaModel.children[i].position.z+4));
|
||||||
|
scope.initanimate(scope.animatelist[animaModel.animacode+"chaijie"],animaModel.children[i],animaModel.name+"jiedianon",points1,0.5,true,0);
|
||||||
|
let points2 = [];
|
||||||
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y+6,animaModel.children[i].position.z+4));
|
||||||
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
|
scope.initanimate(scope.animatelist[animaModel.animacode+"fuwei"],animaModel.children[i],animaModel.name+"jiedianoff",points2,0.5,true,0);
|
||||||
|
|
||||||
|
}
|
||||||
|
if(animaModel.children[i].name == "LCB"){
|
||||||
|
let points1 = [];
|
||||||
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y+8,animaModel.children[i].position.z+2));
|
||||||
|
scope.initanimate(scope.animatelist[animaModel.animacode+"chaijie"],animaModel.children[i],animaModel.name+"yapianon",points1,0.5,true,0);
|
||||||
|
let points2 = [];
|
||||||
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y+8,animaModel.children[i].position.z+2));
|
||||||
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
|
scope.initanimate(scope.animatelist[animaModel.animacode+"fuwei"],animaModel.children[i],animaModel.name+"yapianoff",points2,0.5,true,0);
|
||||||
|
}
|
||||||
|
if(animaModel.children[i].name == "DCU"){
|
||||||
|
let points1 = [];
|
||||||
|
|
||||||
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y+8,animaModel.children[i].position.z+2));
|
||||||
|
scope.initanimate(scope.animatelist[animaModel.animacode+"chaijie"],animaModel.children[i],animaModel.name+"fanghuozhaoon",points1,0.5,true,0);
|
||||||
|
|
||||||
|
let points2 = [];
|
||||||
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y+8,animaModel.children[i].position.z+2));
|
||||||
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
|
scope.initanimate(scope.animatelist[animaModel.animacode+"fuwei"],animaModel.children[i],animaModel.name+"fanghuozhaooff",points2,0.5,true,0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// let points = [];
|
||||||
|
// points.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
|
// points.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
|
// scope.initanimate(animaModel.children[i],animaModel.name+"select1",points,true);
|
||||||
|
let modelorderlist = [];
|
||||||
|
|
||||||
|
modelorderlist[animaModel.animacode] = [
|
||||||
|
{name:"SJZZ",pos:[0,4,10]},
|
||||||
|
{name:"HLGJZ",pos:[0,4,8]},
|
||||||
|
{name:"HLGJY",pos:[0,4,8]},
|
||||||
|
{name:"PDJ",pos:[0,4,6]},
|
||||||
|
{name:"PDJ1",pos:[0,4,6]},
|
||||||
|
{name:"HLZZZ",pos:[0,4,4]},
|
||||||
|
{name:"HLZZY",pos:[0,4,4]},
|
||||||
|
{name:"CLPD",pos:[0,6,4]},
|
||||||
|
{name:"LCB",pos:[0,8,2]},
|
||||||
|
{name:"DCU",pos:[0,8,2]},
|
||||||
|
];
|
||||||
|
|
||||||
|
scope.animatelist[animaModel.animacode+"on"] = [];
|
||||||
|
scope.animatelist[animaModel.animacode+"off"] = [];
|
||||||
|
|
||||||
|
for(let i=0,leni=modelorderlist[animaModel.animacode].length;i<leni;i++){
|
||||||
|
|
||||||
|
let orderdata = modelorderlist[animaModel.animacode];
|
||||||
|
let modelon = animaModel.getObjectByName(orderdata[i].name);
|
||||||
|
// modelon.helpbox = undefined;
|
||||||
|
let pointson = [];
|
||||||
|
pointson.push(new THREE.Vector3(modelon.position.x,modelon.position.y,modelon.position.z));
|
||||||
|
pointson.push(new THREE.Vector3(modelon.position.x+orderdata[i].pos[0],modelon.position.y+orderdata[i].pos[1],modelon.position.z+orderdata[i].pos[2]));
|
||||||
|
|
||||||
|
let pointsoff = [];
|
||||||
|
pointsoff.push(new THREE.Vector3(modelon.position.x+orderdata[i].pos[0],modelon.position.y+orderdata[i].pos[1],modelon.position.z+orderdata[i].pos[2]));
|
||||||
|
pointsoff.push(new THREE.Vector3(modelon.position.x,modelon.position.y,modelon.position.z));
|
||||||
|
|
||||||
|
scope.initanimate(scope.animatelist[animaModel.animacode+"on"],modelon,animaModel.animacode+modelon.name+"on",pointson,0.03,true,i);
|
||||||
|
scope.initanimate(scope.animatelist[animaModel.animacode+"off"],modelon,animaModel.animacode+modelon.name+"off",pointsoff,0.03,true,leni-i-1);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
//定义转辙机零件动画
|
//定义转辙机零件动画
|
||||||
this.initlistnew = function(switchmodel){
|
this.initSwitchAnima = function(animaModel){
|
||||||
scope.animatelist[switchmodel.animacode+"chaijie"] = [];
|
scope.animatelist[animaModel.animacode+"chaijie"] = [];
|
||||||
scope.animatelist[switchmodel.animacode+"fuwei"] = [];
|
scope.animatelist[animaModel.animacode+"fuwei"] = [];
|
||||||
for(let i=0,leni=switchmodel.children.length;i<leni;i++){
|
for(let i=0,leni=animaModel.children.length;i<leni;i++){
|
||||||
if(switchmodel.children[i].name == "DDJ"){
|
if(animaModel.children[i].name == "DDJ"){
|
||||||
let points1 = [];
|
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(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x-1.5,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x-1.5,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"dizuoon",points1,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"chaijie"],animaModel.children[i],animaModel.name+"dizuoon",points1,0.5,true,0);
|
||||||
let points2 = [];
|
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(animaModel.children[i].position.x-1.5,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"dizuooff",points2,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"fuwei"],animaModel.children[i],animaModel.name+"dizuooff",points2,0.5,true,0);
|
||||||
}
|
}
|
||||||
if(switchmodel.children[i].name == "DJZ"){
|
if(animaModel.children[i].name == "DJZ"){
|
||||||
let points1 = [];
|
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(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.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));
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x-3,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"Lxingon",points1,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"chaijie"],animaModel.children[i],animaModel.name+"Lxingon",points1,0.5,true,0);
|
||||||
let points2 = [];
|
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(animaModel.children[i].position.x-3,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"Lxingoff",points2,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"fuwei"],animaModel.children[i],animaModel.name+"Lxingoff",points2,0.5,true,0);
|
||||||
}
|
}
|
||||||
if(switchmodel.children[i].name == "DINGK"){
|
if(animaModel.children[i].name == "DINGK"){
|
||||||
let points1 = [];
|
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(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.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));
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y+9,animaModel.children[i].position.z));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"jiaoxingxiantieon",points1,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"chaijie"],animaModel.children[i],animaModel.name+"jiaoxingxiantieon",points1,0.5,true,0);
|
||||||
let points2 = [];
|
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(animaModel.children[i].position.x,animaModel.children[i].position.y+9,animaModel.children[i].position.z));
|
||||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"jiaoxingxiantieoff",points2,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"fuwei"],animaModel.children[i],animaModel.name+"jiaoxingxiantieoff",points2,0.5,true,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(switchmodel.children[i].name == "SZ"){
|
if(animaModel.children[i].name == "SZ"){
|
||||||
let points1 = [];
|
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(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x-1.5,switchmodel.children[i].position.y,switchmodel.children[i].position.z-1));
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x-1.5,animaModel.children[i].position.y,animaModel.children[i].position.z-1));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"zhongchuipianon",points1,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"chaijie"],animaModel.children[i],animaModel.name+"zhongchuipianon",points1,0.5,true,0);
|
||||||
let points2 = [];
|
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(animaModel.children[i].position.xx-1.5,animaModel.children[i].position.y,animaModel.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));
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"zhongchuipianoff",points2,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"fuwei"],animaModel.children[i],animaModel.name+"zhongchuipianoff",points2,0.5,true,0);
|
||||||
}
|
}
|
||||||
if(switchmodel.children[i].name == "JSQ"){
|
if(animaModel.children[i].name == "JSQ"){
|
||||||
let points1 = [];
|
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(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x-3,switchmodel.children[i].position.y+3,switchmodel.children[i].position.z));
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x-3,animaModel.children[i].position.y+3,animaModel.children[i].position.z));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"laganon",points1,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"chaijie"],animaModel.children[i],animaModel.name+"laganon",points1,0.5,true,0);
|
||||||
let points2 = [];
|
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(animaModel.children[i].position.x-3,animaModel.children[i].position.y+3,animaModel.children[i].position.z));
|
||||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"laganoff",points2,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"fuwei"],animaModel.children[i],animaModel.name+"laganoff",points2,0.5,true,0);
|
||||||
}
|
}
|
||||||
if(switchmodel.children[i].name == "YWJCQ"){
|
if(animaModel.children[i].name == "YWJCQ"){
|
||||||
let points1 = [];
|
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(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.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));
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y+6,animaModel.children[i].position.z+3));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"dongjiedianzhouon",points1,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"chaijie"],animaModel.children[i],animaModel.name+"dongjiedianzhouon",points1,0.5,true,0);
|
||||||
let points2 = [];
|
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(animaModel.children[i].position.x,animaModel.children[i].position.y+6,animaModel.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));
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"dongjiedianzhouoff",points2,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"fuwei"],animaModel.children[i],animaModel.name+"dongjiedianzhouoff",points2,0.5,true,0);
|
||||||
}
|
}
|
||||||
if(switchmodel.children[i].name == "ESWCJJ"){
|
if(animaModel.children[i].name == "ESWCJJ"){
|
||||||
let points1 = [];
|
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(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z));
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y+6,animaModel.children[i].position.z));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"neibuon",points1,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"chaijie"],animaModel.children[i],animaModel.name+"neibuon",points1,0.5,true,0);
|
||||||
let points2 = [];
|
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(animaModel.children[i].position.x,animaModel.children[i].position.y+6,animaModel.children[i].position.z));
|
||||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"neibuoff",points2,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"fuwei"],animaModel.children[i],animaModel.name+"neibuoff",points2,0.5,true,0);
|
||||||
}
|
}
|
||||||
if(switchmodel.children[i].name == "AQJD"){
|
if(animaModel.children[i].name == "AQJD"){
|
||||||
let points1 = [];
|
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(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.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));
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y+6,animaModel.children[i].position.z-2));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"jiedianon",points1,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"chaijie"],animaModel.children[i],animaModel.name+"jiedianon",points1,0.5,true,0);
|
||||||
let points2 = [];
|
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(animaModel.children[i].position.x,animaModel.children[i].position.y+6,animaModel.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));
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"jiedianoff",points2,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"fuwei"],animaModel.children[i],animaModel.name+"jiedianoff",points2,0.5,true,0);
|
||||||
|
|
||||||
}
|
}
|
||||||
if(switchmodel.children[i].name == "QDP"){
|
if(animaModel.children[i].name == "QDP"){
|
||||||
let points1 = [];
|
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(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.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));
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y+6,animaModel.children[i].position.z-3));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"yapianon",points1,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"chaijie"],animaModel.children[i],animaModel.name+"yapianon",points1,0.5,true,0);
|
||||||
let points2 = [];
|
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(animaModel.children[i].position.x,animaModel.children[i].position.y+6,animaModel.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));
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"yapianoff",points2,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"fuwei"],animaModel.children[i],animaModel.name+"yapianoff",points2,0.5,true,0);
|
||||||
}
|
}
|
||||||
if(switchmodel.children[i].name == "SDP"){
|
if(animaModel.children[i].name == "SDP"){
|
||||||
let points1 = [];
|
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(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.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));
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y+6,animaModel.children[i].position.z-4));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"fanghuozhaoon",points1,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"chaijie"],animaModel.children[i],animaModel.name+"fanghuozhaoon",points1,0.5,true,0);
|
||||||
|
|
||||||
let points2 = [];
|
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(animaModel.children[i].position.x,animaModel.children[i].position.y+6,animaModel.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));
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"fanghuozhaooff",points2,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"fuwei"],animaModel.children[i],animaModel.name+"fanghuozhaooff",points2,0.5,true,0);
|
||||||
}
|
}
|
||||||
if(switchmodel.children[i].name == "ZDKBQ"){
|
if(animaModel.children[i].name == "ZDKBQ"){
|
||||||
let points1 = [];
|
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(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+3,switchmodel.children[i].position.z));
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y+3,animaModel.children[i].position.z));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"dianyuanpianon",points1,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"chaijie"],animaModel.children[i],animaModel.name+"dianyuanpianon",points1,0.5,true,0);
|
||||||
let points2 = [];
|
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(animaModel.children[i].position.x,animaModel.children[i].position.y+3,animaModel.children[i].position.z));
|
||||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"dianyuanpianoff",points2,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"fuwei"],animaModel.children[i],animaModel.name+"dianyuanpianoff",points2,0.5,true,0);
|
||||||
}
|
}
|
||||||
if(switchmodel.children[i].name == "ZZ"){
|
if(animaModel.children[i].name == "ZZ"){
|
||||||
let points1 = [];
|
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(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x+3,switchmodel.children[i].position.y+3,switchmodel.children[i].position.z));
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x+3,animaModel.children[i].position.y+3,animaModel.children[i].position.z));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"xinpianon",points1,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"chaijie"],animaModel.children[i],animaModel.name+"xinpianon",points1,0.5,true,0);
|
||||||
let points2 = [];
|
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(animaModel.children[i].position.x+3,animaModel.children[i].position.y+3,animaModel.children[i].position.z));
|
||||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"xinpianoff",points2,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"fuwei"],animaModel.children[i],animaModel.name+"xinpianoff",points2,0.5,true,0);
|
||||||
}
|
}
|
||||||
if(switchmodel.children[i].name =="BSG"){
|
if(animaModel.children[i].name =="BSG"){
|
||||||
let points1 = [];
|
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(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.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));
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x+1,animaModel.children[i].position.y,animaModel.children[i].position.z-5));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"jueyuanzhouon",points1,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"chaijie"],animaModel.children[i],animaModel.name+"jueyuanzhouon",points1,0.5,true,0);
|
||||||
let points2 = [];
|
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(animaModel.children[i].position.x+1,animaModel.children[i].position.y,animaModel.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));
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"jueyuanzhouoff",points2,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"fuwei"],animaModel.children[i],animaModel.name+"jueyuanzhouoff",points2,0.5,true,0);
|
||||||
}
|
}
|
||||||
if(switchmodel.children[i].name =="DZG"){
|
if(animaModel.children[i].name =="DZG"){
|
||||||
let points1 = [];
|
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(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.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));
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x-1,animaModel.children[i].position.y,animaModel.children[i].position.z-5));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"cigangon",points1,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"chaijie"],animaModel.children[i],animaModel.name+"cigangon",points1,0.5,true,0);
|
||||||
let points2 = [];
|
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(animaModel.children[i].position.x-1,animaModel.children[i].position.y,animaModel.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));
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"cigangoff",points2,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"fuwei"],animaModel.children[i],animaModel.name+"cigangoff",points2,0.5,true,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(switchmodel.children[i].name =="CTK"){
|
if(animaModel.children[i].name =="CTK"){
|
||||||
let points1 = [];
|
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(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z));
|
points1.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y+6,animaModel.children[i].position.z));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"ccichuihuqion",points1,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"chaijie"],animaModel.children[i],animaModel.name+"ccichuihuqion",points1,0.5,true,0);
|
||||||
let points2 = [];
|
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(animaModel.children[i].position.x,animaModel.children[i].position.y+6,animaModel.children[i].position.z));
|
||||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
points2.push(new THREE.Vector3(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"ccichuihuqioff",points2,0.5,true,0);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"fuwei"],animaModel.children[i],animaModel.name+"ccichuihuqioff",points2,0.5,true,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// let points = [];
|
// let points = [];
|
||||||
// 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(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
// 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(animaModel.children[i].position.x,animaModel.children[i].position.y,animaModel.children[i].position.z));
|
||||||
// scope.initanimate(switchmodel.children[i],switchmodel.name+"select1",points,true);
|
// scope.initanimate(animaModel.children[i],animaModel.name+"select1",points,true);
|
||||||
let modelorderlist = [];
|
let modelorderlist = [];
|
||||||
|
|
||||||
modelorderlist[switchmodel.animacode] = [
|
modelorderlist[animaModel.animacode] = [
|
||||||
{name:"SZ",pos:[-1.5,0,-1]},
|
{name:"SZ",pos:[-1.5,0,-1]},
|
||||||
{name:"DINGK",pos:[0,9,0]},
|
{name:"DINGK",pos:[0,9,0]},
|
||||||
|
|
||||||
@ -206,13 +361,13 @@ export function Moveanimate(main){
|
|||||||
{name:"DZG",pos:[-1,0,-5]}
|
{name:"DZG",pos:[-1,0,-5]}
|
||||||
];
|
];
|
||||||
|
|
||||||
scope.animatelist[switchmodel.animacode+"on"] = [];
|
scope.animatelist[animaModel.animacode+"on"] = [];
|
||||||
scope.animatelist[switchmodel.animacode+"off"] = [];
|
scope.animatelist[animaModel.animacode+"off"] = [];
|
||||||
|
|
||||||
for(let i=0,leni=modelorderlist[switchmodel.animacode].length;i<leni;i++){
|
for(let i=0,leni=modelorderlist[animaModel.animacode].length;i<leni;i++){
|
||||||
|
|
||||||
let orderdata = modelorderlist[switchmodel.animacode];
|
let orderdata = modelorderlist[animaModel.animacode];
|
||||||
let modelon = switchmodel.getObjectByName(orderdata[i].name);
|
let modelon = animaModel.getObjectByName(orderdata[i].name);
|
||||||
// modelon.helpbox = undefined;
|
// modelon.helpbox = undefined;
|
||||||
let pointson = [];
|
let pointson = [];
|
||||||
pointson.push(new THREE.Vector3(modelon.position.x,modelon.position.y,modelon.position.z));
|
pointson.push(new THREE.Vector3(modelon.position.x,modelon.position.y,modelon.position.z));
|
||||||
@ -223,19 +378,19 @@ export function Moveanimate(main){
|
|||||||
pointsoff.push(new THREE.Vector3(modelon.position.x,modelon.position.y,modelon.position.z));
|
pointsoff.push(new THREE.Vector3(modelon.position.x,modelon.position.y,modelon.position.z));
|
||||||
|
|
||||||
// if(i == 0){
|
// if(i == 0){
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"on"],modelon,switchmodel.animacode+modelon.name+"on",pointson,0.03,true,i);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"on"],modelon,animaModel.animacode+modelon.name+"on",pointson,0.03,true,i);
|
||||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"off"],modelon,switchmodel.animacode+modelon.name+"off",pointsoff,0.03,true,leni-i-1);
|
scope.initanimate(scope.animatelist[animaModel.animacode+"off"],modelon,animaModel.animacode+modelon.name+"off",pointsoff,0.03,true,leni-i-1);
|
||||||
// }else if((i+1)<leni){
|
// }else if((i+1)<leni){
|
||||||
// scope.initanimate(modelon,switchmodel.animacode+modelon.name+"on",pointson,0.03,true,switchmodel.animacode+orderdata[i+1].name+"on");
|
// scope.initanimate(modelon,animaModel.animacode+modelon.name+"on",pointson,0.03,true,animaModel.animacode+orderdata[i+1].name+"on");
|
||||||
// scope.initanimate(modelon,switchmodel.animacode+modelon.name+"off",pointsoff,0.03,true,switchmodel.animacode+orderdata[i-1].name+"off");
|
// scope.initanimate(modelon,animaModel.animacode+modelon.name+"off",pointsoff,0.03,true,animaModel.animacode+orderdata[i-1].name+"off");
|
||||||
// }else{
|
// }else{
|
||||||
// scope.initanimate(modelon,switchmodel.animacode+modelon.name+"on",pointson,0.03,true);
|
// scope.initanimate(modelon,animaModel.animacode+modelon.name+"on",pointson,0.03,true);
|
||||||
// scope.initanimate(modelon,switchmodel.animacode+modelon.name+"off",pointsoff,0.03,true,switchmodel.animacode+orderdata[i-1].name+"off");
|
// scope.initanimate(modelon,animaModel.animacode+modelon.name+"off",pointsoff,0.03,true,animaModel.animacode+orderdata[i-1].name+"off");
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// if(switchmodel.children[i].name == "xinpian"){
|
// if(animaModel.children[i].name == "xinpian"){
|
||||||
// }
|
// }
|
||||||
// if(switchmodel.children[i].name =="cigang"){
|
// if(animaModel.children[i].name =="cigang"){
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,126 @@ export function Textconfig(){
|
|||||||
if(scope.devicelist.length>0){
|
if(scope.devicelist.length>0){
|
||||||
scope.devicelist = [];
|
scope.devicelist = [];
|
||||||
}
|
}
|
||||||
|
console.log(selectmodel.deviceType);
|
||||||
|
if(selectmodel.deviceType == "DeviceSwitch"){
|
||||||
|
initSwitchText(selectmodel);
|
||||||
|
}
|
||||||
|
if(selectmodel.deviceType == "DeviceDoor"){
|
||||||
|
initDoorText(selectmodel);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function initDoorText(selectmodel){
|
||||||
|
for(let i=0,leni=selectmodel.children.length;i<leni;i++){
|
||||||
|
let part= {
|
||||||
|
name:selectmodel.children[i].name,
|
||||||
|
text:null,
|
||||||
|
mesh:selectmodel.children[i],
|
||||||
|
index:i,
|
||||||
|
show:true,
|
||||||
|
msg:null,
|
||||||
|
};
|
||||||
|
if(selectmodel.children[i].name == "HDMZ"){
|
||||||
|
part.text = "滑动门左";
|
||||||
|
part.msg = "滑动门左";
|
||||||
|
selectmodel.children[i].text = "滑动门左";
|
||||||
|
}
|
||||||
|
if(selectmodel.children[i].name == "HDMY"){
|
||||||
|
part.text = "滑动门右";
|
||||||
|
part.msg = "滑动门右";
|
||||||
|
selectmodel.children[i].text = "滑动门右";
|
||||||
|
}
|
||||||
|
if(selectmodel.children[i].name == "CZJG"){
|
||||||
|
part.text = "承重结构";
|
||||||
|
part.msg = "承重结构";
|
||||||
|
selectmodel.children[i].text = "承重结构";
|
||||||
|
}
|
||||||
|
if(selectmodel.children[i].name == "GDM"){
|
||||||
|
part.text = "固定门";
|
||||||
|
part.msg = "固定门";
|
||||||
|
selectmodel.children[i].text = "固定门";
|
||||||
|
}
|
||||||
|
if(selectmodel.children[i].name == "YJMZ"){
|
||||||
|
part.text = "应急门左";
|
||||||
|
part.msg = "应急门左";
|
||||||
|
selectmodel.children[i].text = "应急门左";
|
||||||
|
}
|
||||||
|
if(selectmodel.children[i].name == "YJMY"){
|
||||||
|
part.text = "应急门右";
|
||||||
|
part.msg = "应急门右";
|
||||||
|
selectmodel.children[i].text = "应急门右";
|
||||||
|
}
|
||||||
|
if(selectmodel.children[i].name == "HLGJZ"){
|
||||||
|
part.text = "滑轮挂件左";
|
||||||
|
part.msg = "滑轮挂件左";
|
||||||
|
selectmodel.children[i].text = "滑轮挂件左";
|
||||||
|
}
|
||||||
|
if(selectmodel.children[i].name == "HLGJY"){
|
||||||
|
part.text = "滑轮挂件右";
|
||||||
|
part.msg = "滑轮挂件右";
|
||||||
|
selectmodel.children[i].text = "滑轮挂件右";
|
||||||
|
}
|
||||||
|
if(selectmodel.children[i].name == "HLZZZ"){
|
||||||
|
part.text = "滑轮装置左";
|
||||||
|
part.msg = "滑轮装置左";
|
||||||
|
selectmodel.children[i].text = "滑轮装置左";
|
||||||
|
}
|
||||||
|
if(selectmodel.children[i].name == "HLZZY"){
|
||||||
|
part.text = "滑轮装置右";
|
||||||
|
part.msg = "滑轮装置右";
|
||||||
|
selectmodel.children[i].text = "滑轮装置右";
|
||||||
|
}
|
||||||
|
if(selectmodel.children[i].name == "CLPD"){
|
||||||
|
part.text = "齿轮皮带";
|
||||||
|
part.msg = "齿轮皮带";
|
||||||
|
selectmodel.children[i].text = "齿轮皮带";
|
||||||
|
}
|
||||||
|
if(selectmodel.children[i].name == "SJZZ"){
|
||||||
|
part.text = "锁紧装置";
|
||||||
|
part.msg = "锁紧装置";
|
||||||
|
selectmodel.children[i].text = "锁紧装置";
|
||||||
|
}
|
||||||
|
if(selectmodel.children[i].name == "DCU"){
|
||||||
|
part.text = "门控单元";
|
||||||
|
part.msg = "门控单元";
|
||||||
|
selectmodel.children[i].text = "门控单元";
|
||||||
|
}
|
||||||
|
if(selectmodel.children[i].name == "MJL"){
|
||||||
|
part.text = "门机梁";
|
||||||
|
part.msg = "门机梁";
|
||||||
|
selectmodel.children[i].text = "门机梁";
|
||||||
|
}
|
||||||
|
if(selectmodel.children[i].name =="LCB"){
|
||||||
|
part.text = "就地控制盒";
|
||||||
|
part.msg = "就地控制盒";
|
||||||
|
selectmodel.children[i].text = "就地控制盒";
|
||||||
|
}
|
||||||
|
|
||||||
|
if(selectmodel.children[i].name =="PDJ"){
|
||||||
|
part.text = "皮带夹左";
|
||||||
|
part.msg = "皮带夹左";
|
||||||
|
selectmodel.children[i].text = "皮带夹左";
|
||||||
|
}
|
||||||
|
|
||||||
|
if(selectmodel.children[i].name =="PDJ1"){
|
||||||
|
part.text = "皮带夹右";
|
||||||
|
part.msg = "皮带夹右";
|
||||||
|
selectmodel.children[i].text = "皮带夹右";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// if(part.text == null){
|
||||||
|
// console.log(selectmodel.children[i].name);
|
||||||
|
// }
|
||||||
|
if(part.text){
|
||||||
|
scope.devicelist.push(part);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function initSwitchText(selectmodel){
|
||||||
for(let i=0,leni=selectmodel.children.length;i<leni;i++){
|
for(let i=0,leni=selectmodel.children.length;i<leni;i++){
|
||||||
let part= {
|
let part= {
|
||||||
name:selectmodel.children[i].name,
|
name:selectmodel.children[i].name,
|
||||||
@ -109,5 +228,4 @@ export function Textconfig(){
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -208,7 +208,7 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
|
|||||||
location.reload();
|
location.reload();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let changeelement = document.getElementById('jl3d');
|
let changeelement = document.getElementById('jl3d');
|
||||||
@ -243,15 +243,19 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
|
|||||||
scope.modelmanager.loadpromise(netDataAssets.deviceAssetList, scope.mixers).then(function (data) {
|
scope.modelmanager.loadpromise(netDataAssets.deviceAssetList, scope.mixers).then(function (data) {
|
||||||
//综合演练情况下当模型加载后显示
|
//综合演练情况下当模型加载后显示
|
||||||
psdModelShow();
|
psdModelShow();
|
||||||
moveanima.initlistnew(scope.modelmanager.switchmodel.mesh);
|
moveanima.initSwitchAnima(scope.modelmanager.switchmodel.mesh);
|
||||||
|
moveanima.initDoorAnima(scope.modelmanager.standmodel.mesh);
|
||||||
daochamodel = scope.modelmanager.switchmodel.mesh.getObjectByName("DAOCHA");
|
daochamodel = scope.modelmanager.switchmodel.mesh.getObjectByName("DAOCHA");
|
||||||
if(scope.stationtexture["devicelist"]){
|
if(scope.stationtexture["devicelist"]){
|
||||||
scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map =scope.stationtexture["devicelist"];
|
scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map =scope.stationtexture["devicelist"];
|
||||||
scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map.needsUpdate = true;
|
scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map.needsUpdate = true;
|
||||||
}
|
}
|
||||||
if(scope.stationtexture["pingbimen"]){
|
if(scope.stationtexture["pingbimen"]){
|
||||||
scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map =scope.stationtexture["pingbimen"];
|
scope.modelmanager.standmodel.mesh.getObjectByName("DX").material.map =scope.stationtexture["pingbimen"];
|
||||||
scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map.needsUpdate = true;
|
scope.modelmanager.standmodel.mesh.getObjectByName("DX").material.map.needsUpdate = true;
|
||||||
|
scope.modelmanager.standmodel.mesh.getObjectByName("DXHDQG").material.map =scope.stationtexture["pingbimen"];
|
||||||
|
scope.modelmanager.standmodel.mesh.getObjectByName("DXHDQG").material.map.needsUpdate = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
@ -313,6 +317,16 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
|
|||||||
scope.modelmanager.switchmodel.mesh.remove(daochamodel);
|
scope.modelmanager.switchmodel.mesh.remove(daochamodel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//屏蔽门顶盖
|
||||||
|
this.hideDx = function (nowdxstatus){
|
||||||
|
if(nowdxstatus == true){
|
||||||
|
scope.modelmanager.standmodel.mesh.getObjectByName("DXHDQG").rotation.x = Math.PI/2;
|
||||||
|
}
|
||||||
|
if(nowdxstatus == false){
|
||||||
|
scope.modelmanager.standmodel.mesh.getObjectByName("DXHDQG").rotation.x = -Math.PI/2;
|
||||||
|
}
|
||||||
|
}
|
||||||
//选择模型
|
//选择模型
|
||||||
this.selectmodel = function (data) {
|
this.selectmodel = function (data) {
|
||||||
// scope.modelmanager
|
// scope.modelmanager
|
||||||
@ -325,6 +339,10 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
|
|||||||
if(scope.nowobject){
|
if(scope.nowobject){
|
||||||
scope.resetmodel();
|
scope.resetmodel();
|
||||||
}
|
}
|
||||||
|
scope.raycasterstatus = false;
|
||||||
|
scope.nowobject = null;
|
||||||
|
updatemenulist();
|
||||||
|
|
||||||
if (data._type == "Switch") {
|
if (data._type == "Switch") {
|
||||||
// scope.modelmanager.switchmodel.locateType = data.body.locateType;
|
// scope.modelmanager.switchmodel.locateType = data.body.locateType;
|
||||||
scope.modelmanager.switchmodel.code = data.code;
|
scope.modelmanager.switchmodel.code = data.code;
|
||||||
@ -332,13 +350,8 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
|
|||||||
scope.scene.add(scope.showmodel);
|
scope.scene.add(scope.showmodel);
|
||||||
scope.devicetext.initdevicetext(scope.modelmanager.switchmodel.mesh);
|
scope.devicetext.initdevicetext(scope.modelmanager.switchmodel.mesh);
|
||||||
scope.nowobject = scope.modelmanager.switchmodel.mesh;
|
scope.nowobject = scope.modelmanager.switchmodel.mesh;
|
||||||
updatemenulist(scope.devicetext.devicelist);
|
updatemenulist(scope.devicetext.devicelist,"switch");
|
||||||
scope.raycasterstatus = true;
|
scope.raycasterstatus = true;
|
||||||
}else{
|
|
||||||
|
|
||||||
scope.raycasterstatus = false;
|
|
||||||
scope.nowobject = null;
|
|
||||||
updatemenulist();
|
|
||||||
}
|
}
|
||||||
if (data._type == "Signal") {
|
if (data._type == "Signal") {
|
||||||
scope.modelmanager.signalmodel.code = data.code;
|
scope.modelmanager.signalmodel.code = data.code;
|
||||||
@ -351,9 +364,15 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
|
|||||||
scope.showmodel = scope.modelmanager.standmodel.mesh;
|
scope.showmodel = scope.modelmanager.standmodel.mesh;
|
||||||
scope.scene.add(scope.showmodel);
|
scope.scene.add(scope.showmodel);
|
||||||
if(scope.stationtexture[psdtexturemap[data.standCode]]){
|
if(scope.stationtexture[psdtexturemap[data.standCode]]){
|
||||||
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.standCode]];
|
scope.modelmanager.standmodel.mesh.getObjectByName("DX").material.map =scope.stationtexture[psdtexturemap[data.standCode]];
|
||||||
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
|
scope.modelmanager.standmodel.mesh.getObjectByName("DX").material.map.needsUpdate = true;
|
||||||
|
scope.modelmanager.standmodel.mesh.getObjectByName("DXHDQG").material.map =scope.stationtexture[psdtexturemap[data.standCode]];
|
||||||
|
scope.modelmanager.standmodel.mesh.getObjectByName("DXHDQG").material.map.needsUpdate = true;
|
||||||
}
|
}
|
||||||
|
scope.devicetext.initdevicetext(scope.modelmanager.standmodel.mesh);
|
||||||
|
updatemenulist(scope.devicetext.devicelist,"door");
|
||||||
|
scope.nowobject = scope.modelmanager.standmodel.mesh;
|
||||||
|
scope.raycasterstatus = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data._type == "Section") {
|
if (data._type == "Section") {
|
||||||
@ -377,7 +396,7 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
|
|||||||
|
|
||||||
scope.devicetext.initdevicetext(scope.modelmanager.switchmodel.mesh);
|
scope.devicetext.initdevicetext(scope.modelmanager.switchmodel.mesh);
|
||||||
scope.nowobject = scope.modelmanager.switchmodel.mesh;
|
scope.nowobject = scope.modelmanager.switchmodel.mesh;
|
||||||
updatemenulist(scope.devicetext.devicelist);
|
updatemenulist(scope.devicetext.devicelist,"switch");
|
||||||
scope.raycasterstatus = true;
|
scope.raycasterstatus = true;
|
||||||
// scope.scene.add(scope.showmodel);
|
// scope.scene.add(scope.showmodel);
|
||||||
if (data.normalPosition == "0") {
|
if (data.normalPosition == "0") {
|
||||||
@ -406,20 +425,31 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
|
|||||||
|
|
||||||
if (data._type == "Psd") {
|
if (data._type == "Psd") {
|
||||||
scope.showmodel = scope.modelmanager.standmodel.mesh;
|
scope.showmodel = scope.modelmanager.standmodel.mesh;
|
||||||
|
|
||||||
scope.scene.add(scope.showmodel);
|
scope.scene.add(scope.showmodel);
|
||||||
|
scope.devicetext.initdevicetext(scope.modelmanager.standmodel.mesh);
|
||||||
|
updatemenulist(scope.devicetext.devicelist,"door");
|
||||||
|
scope.nowobject = scope.modelmanager.standmodel.mesh;
|
||||||
|
scope.raycasterstatus = true;
|
||||||
if(data.standCode == undefined){
|
if(data.standCode == undefined){
|
||||||
if(psdtexturemap[data.code]){
|
if(psdtexturemap[data.code]){
|
||||||
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.code]];
|
scope.modelmanager.standmodel.mesh.getObjectByName("DX").material.map =scope.stationtexture[psdtexturemap[data.code]];
|
||||||
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
|
scope.modelmanager.standmodel.mesh.getObjectByName("DX").material.map.needsUpdate = true;
|
||||||
|
scope.modelmanager.standmodel.mesh.getObjectByName("DXHDQG").material.map =scope.stationtexture[psdtexturemap[data.code]];
|
||||||
|
scope.modelmanager.standmodel.mesh.getObjectByName("DXHDQG").material.map.needsUpdate = true;
|
||||||
}else{
|
}else{
|
||||||
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture["Station18398"];
|
scope.modelmanager.standmodel.mesh.getObjectByName("DX").material.map =scope.stationtexture["Station18398"];
|
||||||
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
|
scope.modelmanager.standmodel.mesh.getObjectByName("DX").material.map.needsUpdate = true;
|
||||||
|
scope.modelmanager.standmodel.mesh.getObjectByName("DXHDQG").material.map =scope.stationtexture["Station18398"];
|
||||||
|
scope.modelmanager.standmodel.mesh.getObjectByName("DXHDQG").material.map.needsUpdate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if(scope.stationtexture[psdtexturemap[data.standCode]]){
|
if(scope.stationtexture[psdtexturemap[data.standCode]]){
|
||||||
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.standCode]];
|
scope.modelmanager.standmodel.mesh.getObjectByName("DX").material.map =scope.stationtexture[psdtexturemap[data.standCode]];
|
||||||
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
|
scope.modelmanager.standmodel.mesh.getObjectByName("DX").material.map.needsUpdate = true;
|
||||||
|
scope.modelmanager.standmodel.mesh.getObjectByName("DXHDQG").material.map =scope.stationtexture[psdtexturemap[data.standCode]];
|
||||||
|
scope.modelmanager.standmodel.mesh.getObjectByName("DXHDQG").material.map.needsUpdate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -885,7 +915,7 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
|
|||||||
|
|
||||||
raycaster.setFromCamera( mouse, scope.camera );
|
raycaster.setFromCamera( mouse, scope.camera );
|
||||||
|
|
||||||
let intersects = raycaster.intersectObjects( scope.modelmanager.switchmodel.mesh.children,true);
|
let intersects = raycaster.intersectObjects( scope.nowobject.children,true);
|
||||||
if(helpbox){
|
if(helpbox){
|
||||||
scope.scene.remove( helpbox );
|
scope.scene.remove( helpbox );
|
||||||
helpbox = null;
|
helpbox = null;
|
||||||
|
@ -55,11 +55,21 @@ export function ModelManager(){
|
|||||||
deviceType: "staticSwitch",
|
deviceType: "staticSwitch",
|
||||||
id: "x11",
|
id: "x11",
|
||||||
packageName: "转辙教学模型",
|
packageName: "转辙教学模型",
|
||||||
type: "staticSwitch",
|
type: "static",
|
||||||
url: "/device/switch/511DHcongxinzuo22222222222222(1).fbx"
|
url: "/device/switch/511DHcongxinzuo22222222222222(1).fbx"
|
||||||
};
|
};
|
||||||
initlist.push(fbxpromise(staticSwitch,mixers,scope.staticswitchmodel));
|
initlist.push(fbxpromise(staticSwitch,mixers,scope.staticswitchmodel));
|
||||||
|
|
||||||
|
let staticDoor = {
|
||||||
|
assetname: "新屏蔽门",
|
||||||
|
deviceType: "DeviceDoor",
|
||||||
|
id: "d1",
|
||||||
|
packageName: "新屏蔽门",
|
||||||
|
type: "static",
|
||||||
|
url: "/device/door/PBM.FBX"
|
||||||
|
};
|
||||||
|
initlist.push(fbxpromise(staticDoor,mixers,scope.standmodel));
|
||||||
|
|
||||||
for(let i=0,leni=data.length;i<leni;i++){
|
for(let i=0,leni=data.length;i<leni;i++){
|
||||||
if(data[i].deviceType == "DeviceSignal"){
|
if(data[i].deviceType == "DeviceSignal"){
|
||||||
initlist.push(fbxpromise(data[i],mixers,scope.signalmodel));
|
initlist.push(fbxpromise(data[i],mixers,scope.signalmodel));
|
||||||
@ -67,9 +77,9 @@ export function ModelManager(){
|
|||||||
if(data[i].deviceType == "DeviceSwitch"){
|
if(data[i].deviceType == "DeviceSwitch"){
|
||||||
initlist.push(fbxpromise(data[i],mixers,scope.switchmodel));
|
initlist.push(fbxpromise(data[i],mixers,scope.switchmodel));
|
||||||
}
|
}
|
||||||
if(data[i].deviceType == "DeviceDoor"){
|
// if(data[i].deviceType == "DeviceDoor"){
|
||||||
initlist.push(fbxpromise(data[i],mixers,scope.standmodel));
|
// initlist.push(fbxpromise(data[i],mixers,scope.standmodel));
|
||||||
}
|
// }
|
||||||
if(data[i].deviceType == "DeviceSection"){
|
if(data[i].deviceType == "DeviceSection"){
|
||||||
initlist.push(fbxpromise(data[i],mixers,scope.sectionmodel));
|
initlist.push(fbxpromise(data[i],mixers,scope.sectionmodel));
|
||||||
}
|
}
|
||||||
@ -95,7 +105,7 @@ function fbxpromise(asset,mixers,model){
|
|||||||
return new Promise(function(resolve, reject){
|
return new Promise(function(resolve, reject){
|
||||||
var loader = new THREE.FBXLoader();
|
var loader = new THREE.FBXLoader();
|
||||||
let modelurl;
|
let modelurl;
|
||||||
if(asset.type == "staticSwitch"){
|
if(asset.type == "static"){
|
||||||
modelurl = JL3D_LOCAL_STATIC+asset.url;
|
modelurl = JL3D_LOCAL_STATIC+asset.url;
|
||||||
}else{
|
}else{
|
||||||
modelurl = BASE_ASSET_API+asset.url;
|
modelurl = BASE_ASSET_API+asset.url;
|
||||||
@ -109,9 +119,10 @@ function fbxpromise(asset,mixers,model){
|
|||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
object.animacode = model.code;
|
object.animacode = model.code;
|
||||||
|
object.deviceType = asset.deviceType;
|
||||||
model.mesh = object;
|
model.mesh = object;
|
||||||
if(object.animations.length>0){
|
if(object.animations.length>0){
|
||||||
if(asset.type == "staticSwitch"){
|
if(asset.deviceType == "staticSwitch"){
|
||||||
|
|
||||||
// for(let i=0;i<object.animations.length;i++){
|
// for(let i=0;i<object.animations.length;i++){
|
||||||
// model.action[object.animations[i].name] = mixer.clipAction( object.animations[ i ] );
|
// model.action[object.animations[i].name] = mixer.clipAction( object.animations[ i ] );
|
||||||
|
@ -1,21 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="jl3d" style="z-index: 2010" class="jl3ddraw">
|
<div id="jl3d" style="z-index: 2010" class="jl3ddraw">
|
||||||
<Jl3ddevice-Msg v-show="isswitch ">
|
<Jl3ddevice-Msg v-show="showMsgComponent ">
|
||||||
</Jl3ddevice-Msg>
|
</Jl3ddevice-Msg>
|
||||||
<Jl3ddevice-List v-show="!actionshow &&isswitch" :devicelist="devicelist" @sdevice="sdevice">
|
<Jl3ddevice-List v-show="!actionshow &&showMsgComponent" :devicelist="devicelist" @sdevice="sdevice">
|
||||||
</Jl3ddevice-List>
|
</Jl3ddevice-List>
|
||||||
<canvas id="canvastexture" ></canvas>
|
<canvas id="canvastexture" ></canvas>
|
||||||
<div class="jl3dcontrolpane" v-show="isswitch">
|
|
||||||
|
<div class="jl3dcontrolpane" v-show="showMsgComponent">
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button type="primary" @click="back">初始化</el-button>
|
<el-button type="primary" @click="back">初始化</el-button>
|
||||||
<el-button type="primary" @click="alldisper">{{disperreset}}</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="dispersed">{{devicestats}}</el-button>
|
||||||
<el-button type="primary" @click="switchhide">{{switchshow}}</el-button>
|
|
||||||
<el-button type="primary" @click="actionmodechange">{{actioncontrol}}</el-button>
|
<el-button v-show="showbutton=='door'" type="primary" @click="dxchange">{{doorDxStatus}}</el-button>
|
||||||
|
|
||||||
|
<el-button v-show="showbutton=='switch'" type="primary" @click="switchhide">{{switchshow}}</el-button>
|
||||||
|
<el-button v-show="showbutton=='switch'" type="primary" @click="actionmodechange">{{actioncontrol}}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="jl3dactionpane" v-show="actionshow && isswitch">
|
<div class="jl3dactionpane" v-show="actionshow && showMsgComponent">
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button type="primary" v-for="item in actionList" :key="item.type" @click="changeAction(item)">{{item.name}}</el-button>
|
<el-button type="primary" v-for="item in actionList" :key="item.type" @click="changeAction(item)">{{item.name}}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
@ -55,11 +59,13 @@
|
|||||||
devicestats:"分步拆解",
|
devicestats:"分步拆解",
|
||||||
disperreset:"整体拆解",
|
disperreset:"整体拆解",
|
||||||
switchshow:"隐藏轨道",
|
switchshow:"隐藏轨道",
|
||||||
|
doorDxStatus:"顶箱关",
|
||||||
switchstatus:true,
|
switchstatus:true,
|
||||||
actioncontrol:"启用手摇道岔操作模式",
|
actioncontrol:"启用手摇道岔操作模式",
|
||||||
actionshow:false,
|
actionshow:false,
|
||||||
isPsd:true,
|
isPsd:true,
|
||||||
isswitch:false,
|
showbutton:"",
|
||||||
|
showMsgComponent:false,
|
||||||
actionList:[
|
actionList:[
|
||||||
{
|
{
|
||||||
name:"步骤1:查看道岔",
|
name:"步骤1:查看道岔",
|
||||||
@ -219,13 +225,14 @@
|
|||||||
this.jl3d.domresize();
|
this.jl3d.domresize();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updatemenulist(devicelist) {
|
updatemenulist(devicelist,type) {
|
||||||
|
this.showbutton = type;
|
||||||
if(devicelist){
|
if(devicelist){
|
||||||
this.devicelist = devicelist;
|
this.devicelist = devicelist;
|
||||||
this.isswitch = true;
|
this.showMsgComponent = true;
|
||||||
}else{
|
}else{
|
||||||
this.devicelist = [];
|
this.devicelist = [];
|
||||||
this.isswitch = false;
|
this.showMsgComponent = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.actionshow = false;
|
this.actionshow = false;
|
||||||
@ -254,6 +261,15 @@
|
|||||||
this.jl3d.hideswitch(this.switchstatus);
|
this.jl3d.hideswitch(this.switchstatus);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
dxchange(){
|
||||||
|
if(this.doorDxStatus == "顶箱关"){
|
||||||
|
this.doorDxStatus = "顶箱开";
|
||||||
|
this.jl3d.hideDx(true);
|
||||||
|
}else{
|
||||||
|
this.doorDxStatus = "顶箱关";
|
||||||
|
this.jl3d.hideDx(false);
|
||||||
|
}
|
||||||
|
},
|
||||||
actionmodechange(){
|
actionmodechange(){
|
||||||
if(this.actionshow == false){
|
if(this.actionshow == false){
|
||||||
this.actionshow = true;
|
this.actionshow = true;
|
||||||
|
BIN
static/device/door/PBM.FBX
Normal file
BIN
static/device/door/PBM.FBX
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user