修改三维vr道岔模型动画导航bug
This commit is contained in:
parent
b87220ec8c
commit
e57a70df9e
@ -556,7 +556,7 @@ export function Jl3dfaultdeviceVR(dom,group,skinCode) {
|
||||
// let netDataAssets = JSON.parse(netdata.data.assets);
|
||||
// setpsdstationmap(JSON.parse(netdata.data.stands));
|
||||
scope.modelmanager.loadpromise(mixers).then(function (data) {
|
||||
switchModel = scope.modelmanager.otherDevice.mesh.getObjectByName("SWITCH");
|
||||
switchModel = scope.modelmanager.otherDevice.mesh.getObjectByName("SWITCH1");
|
||||
moveanima.initlistnew(switchModel);
|
||||
|
||||
scope.devicetext.initdevicetext(switchModel);
|
||||
@ -891,6 +891,7 @@ export function Jl3dfaultdeviceVR(dom,group,skinCode) {
|
||||
if(navMesh){
|
||||
scope.scene.remove( navMesh );
|
||||
}
|
||||
|
||||
if(navStatus){
|
||||
navStatus = false;
|
||||
}else{
|
||||
@ -899,7 +900,8 @@ export function Jl3dfaultdeviceVR(dom,group,skinCode) {
|
||||
let startPoint = new THREE.Vector3(human.position.x,human.position.y-0.6,human.position.z);
|
||||
pathPoints.push(new THREE.Vector3(human.position.x,human.position.y,human.position.z));
|
||||
groupID = pathFinder.getGroup( ZONE, startPoint );
|
||||
targetPosition = new THREE.Vector3(switchModel.matrixWorld.elements[12],-5.596,switchModel.matrixWorld.elements[14]);
|
||||
targetPosition = new THREE.Vector3(switchModel.matrixWorld.elements[12],switchModel.matrixWorld.elements[13],switchModel.matrixWorld.elements[14]);
|
||||
|
||||
//
|
||||
// console.log(pathPoints[0]);
|
||||
// console.log(targetPosition);
|
||||
@ -1211,6 +1213,7 @@ export function Jl3dfaultdeviceVR(dom,group,skinCode) {
|
||||
};
|
||||
|
||||
this.updateaction = function (data) {
|
||||
console.log(data);
|
||||
if (data.type == "SWITCH") {
|
||||
if (data.normal == "0") {
|
||||
scope.modelmanager.otherDevice.normalPosition = "0";
|
||||
|
@ -20,7 +20,7 @@ export function MoveanimateVr(main){
|
||||
scope.animatelist[switchmodel.animacode+"chaijie"] = [];
|
||||
scope.animatelist[switchmodel.animacode+"fuwei"] = [];
|
||||
for(let i=0,leni=switchmodel.children.length;i<leni;i++){
|
||||
if(switchmodel.children[i].name == "DDJ"){
|
||||
if(switchmodel.children[i].name == "DDJ011"){
|
||||
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));
|
||||
@ -32,7 +32,7 @@ export function MoveanimateVr(main){
|
||||
|
||||
|
||||
}
|
||||
if(switchmodel.children[i].name == "DJZ"){
|
||||
if(switchmodel.children[i].name == "DJZ011"){
|
||||
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));
|
||||
@ -42,7 +42,7 @@ export function MoveanimateVr(main){
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"Lxingoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "DINGK"){
|
||||
if(switchmodel.children[i].name == "DINGK011"){
|
||||
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));
|
||||
@ -53,7 +53,7 @@ export function MoveanimateVr(main){
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"jiaoxingxiantieoff",points2,0.5,true,0);
|
||||
}
|
||||
|
||||
if(switchmodel.children[i].name == "SZ"){
|
||||
if(switchmodel.children[i].name == "SZ011"){
|
||||
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));
|
||||
@ -63,7 +63,7 @@ export function MoveanimateVr(main){
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"zhongchuipianoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "JSQ"){
|
||||
if(switchmodel.children[i].name == "JSQ011"){
|
||||
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));
|
||||
@ -73,7 +73,7 @@ export function MoveanimateVr(main){
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"laganoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "YWJCQ"){
|
||||
if(switchmodel.children[i].name == "YWJCQ011"){
|
||||
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));
|
||||
@ -83,7 +83,7 @@ export function MoveanimateVr(main){
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"dongjiedianzhouoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "ESWCJJ"){
|
||||
if(switchmodel.children[i].name == "ESWCJJ011"){
|
||||
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));
|
||||
@ -93,7 +93,7 @@ export function MoveanimateVr(main){
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"neibuoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "AQJD"){
|
||||
if(switchmodel.children[i].name == "AQJD011"){
|
||||
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));
|
||||
@ -104,7 +104,7 @@ export function MoveanimateVr(main){
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"jiedianoff",points2,0.5,true,0);
|
||||
|
||||
}
|
||||
if(switchmodel.children[i].name == "QDP"){
|
||||
if(switchmodel.children[i].name == "QDP011"){
|
||||
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));
|
||||
@ -114,7 +114,7 @@ export function MoveanimateVr(main){
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"yapianoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "SDP"){
|
||||
if(switchmodel.children[i].name == "SDP011"){
|
||||
let points1 = [];
|
||||
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
@ -126,7 +126,7 @@ export function MoveanimateVr(main){
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"fanghuozhaooff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "ZDKBQ"){
|
||||
if(switchmodel.children[i].name == "ZDKBQ011"){
|
||||
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));
|
||||
@ -136,7 +136,7 @@ export function MoveanimateVr(main){
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"dianyuanpianoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "ZZ"){
|
||||
if(switchmodel.children[i].name == "ZZ011"){
|
||||
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));
|
||||
@ -146,7 +146,7 @@ export function MoveanimateVr(main){
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"xinpianoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name =="BSG"){
|
||||
if(switchmodel.children[i].name =="BSG011"){
|
||||
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));
|
||||
@ -156,7 +156,7 @@ export function MoveanimateVr(main){
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"jueyuanzhouoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name =="DZG"){
|
||||
if(switchmodel.children[i].name =="DZG011"){
|
||||
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));
|
||||
@ -167,7 +167,7 @@ export function MoveanimateVr(main){
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"cigangoff",points2,0.5,true,0);
|
||||
}
|
||||
|
||||
if(switchmodel.children[i].name =="CTK"){
|
||||
if(switchmodel.children[i].name =="CTK011"){
|
||||
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));
|
||||
@ -188,21 +188,21 @@ export function MoveanimateVr(main){
|
||||
|
||||
|
||||
modelorderlist[switchmodel.animacode] = [
|
||||
{name:"SZ",pos:[-1.5,0,-1]},//锁子
|
||||
{name:"DINGK",pos:[0,0,9]},//顶盖
|
||||
{name:"DJZ",pos:[-3,0,0]},
|
||||
{name:"DDJ",pos:[-1.5,0,0]},
|
||||
{name:"JSQ",pos:[-3,0,3]},
|
||||
{name:"ZDKBQ",pos:[0,0,3]},
|
||||
{name:"ZZ",pos:[3,0,3]},
|
||||
{name:"ESWCJJ",pos:[0,0,6]},
|
||||
{name:"CTK",pos:[0,0,6]},
|
||||
{name:"YWJCQ",pos:[0,3,6]},
|
||||
{name:"AQJD",pos:[0,-2,6]},
|
||||
{name:"QDP",pos:[0,-3,6]},
|
||||
{name:"SDP",pos:[0,-4,6]},
|
||||
{name:"BSG",pos:[1,-5,0]},
|
||||
{name:"DZG",pos:[-1,-5,0]}
|
||||
{name:"SZ011",pos:[-1.5,0,-1]},//锁子
|
||||
{name:"DINGK011",pos:[0,0,9]},//顶盖
|
||||
{name:"DJZ011",pos:[-3,0,0]},
|
||||
{name:"DDJ011",pos:[-1.5,0,0]},
|
||||
{name:"JSQ011",pos:[-3,0,3]},
|
||||
{name:"ZDKBQ011",pos:[0,0,3]},
|
||||
{name:"ZZ011",pos:[3,0,3]},
|
||||
{name:"ESWCJJ011",pos:[0,0,6]},
|
||||
{name:"CTK011",pos:[0,0,6]},
|
||||
{name:"YWJCQ011",pos:[0,3,6]},
|
||||
{name:"AQJD011",pos:[0,-2,6]},
|
||||
{name:"QDP011",pos:[0,-3,6]},
|
||||
{name:"SDP011",pos:[0,-4,6]},
|
||||
{name:"BSG011",pos:[1,-5,0]},
|
||||
{name:"DZG011",pos:[-1,-5,0]}
|
||||
|
||||
|
||||
|
||||
|
@ -738,6 +738,7 @@ function timedCount(){
|
||||
// postMessage(data.body[i]);
|
||||
// }
|
||||
// }
|
||||
|
||||
if(data.type == "VR_Sync_3D"){
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user