替换优化后三维cctv模型,修改切换站台未清空当前列车编号bug
This commit is contained in:
parent
c1b8a6eb3d
commit
e83553c39a
@ -7,8 +7,6 @@ export function PassflowConnect(jl3dpass,deviceaction,toptrain,downtrain,routegr
|
||||
const scope = this;
|
||||
this.teststomp = new StompClient();
|
||||
|
||||
let traintopnow = null;
|
||||
let traindownnow = null;
|
||||
let topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
let header = {'X-Token': getToken() };
|
||||
|
||||
@ -62,7 +60,7 @@ export function PassflowConnect(jl3dpass,deviceaction,toptrain,downtrain,routegr
|
||||
}
|
||||
}
|
||||
if(data.body.type == "TRAIN_DOOR"){
|
||||
if(traintopnow == data.body.code){
|
||||
if(toptrain.nowcode == data.body.code){
|
||||
|
||||
if(data.body.open == "0"){
|
||||
closetraindoor(toptrain,data.body.doorCode,"top");
|
||||
@ -73,7 +71,7 @@ export function PassflowConnect(jl3dpass,deviceaction,toptrain,downtrain,routegr
|
||||
}
|
||||
|
||||
}
|
||||
if(traindownnow == data.body.code){
|
||||
if(downtrain.nowcode == data.body.code){
|
||||
// console.log(data.body);
|
||||
if(data.body.open == "0"){
|
||||
closetraindoor(downtrain,data.body.doorCode,"down");
|
||||
@ -91,8 +89,8 @@ export function PassflowConnect(jl3dpass,deviceaction,toptrain,downtrain,routegr
|
||||
|
||||
for(let i=0,leni = data.body.length;i<leni;i++){
|
||||
if(data.body[i].section == jl3dpass.nowstation.topsection){
|
||||
if(traintopnow != data.body[i].code){
|
||||
traintopnow = data.body[i].code;
|
||||
if(toptrain.nowcode != data.body[i].code){
|
||||
toptrain.nowcode = data.body[i].code;
|
||||
}
|
||||
toptrain.position.copy(toptrain.curve.getPointAt(data.body[i].offset));
|
||||
|
||||
@ -101,20 +99,20 @@ export function PassflowConnect(jl3dpass,deviceaction,toptrain,downtrain,routegr
|
||||
//
|
||||
// }
|
||||
}else{
|
||||
if(traindownnow == data.body[i].code){
|
||||
if(downtrain.nowcode == data.body[i].code){
|
||||
toptrain.position.x -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
if(data.body[i].section == jl3dpass.nowstation.downsection){
|
||||
if(traindownnow != data.body[i].code){
|
||||
traindownnow = data.body[i].code;
|
||||
if(downtrain.nowcode != data.body[i].code){
|
||||
downtrain.nowcode = data.body[i].code;
|
||||
}
|
||||
|
||||
downtrain.position.copy(downtrain.curve.getPointAt(data.body[i].offset));
|
||||
|
||||
}else{
|
||||
if(traindownnow == data.body[i].code){
|
||||
if(downtrain.nowcode == data.body[i].code){
|
||||
downtrain.position.x += 1;
|
||||
}
|
||||
}
|
||||
@ -151,26 +149,23 @@ export function PassflowConnect(jl3dpass,deviceaction,toptrain,downtrain,routegr
|
||||
}
|
||||
}
|
||||
function closetraindoor(train,doorcode,direct){
|
||||
|
||||
if(direct == "top"){
|
||||
if(doorcode == "1"){
|
||||
actions = train.action.down;
|
||||
}
|
||||
|
||||
if(doorcode == "2"){
|
||||
actions = train.action.top;
|
||||
}
|
||||
|
||||
|
||||
toptrain.nowcode = null;
|
||||
}else{
|
||||
if(doorcode == "1"){
|
||||
actions = train.action.top;
|
||||
}
|
||||
|
||||
if(doorcode == "2"){
|
||||
actions = train.action.down;
|
||||
}
|
||||
|
||||
|
||||
downtrain.nowcode = null;
|
||||
}
|
||||
|
||||
for(let an=actions.length-1;an>=0;an--){
|
||||
|
@ -482,6 +482,9 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
|
||||
//下车控制开关
|
||||
toppasseron = false;
|
||||
downpasseron = false;
|
||||
|
||||
toptrain.nowcode = null;
|
||||
downtrain.nowcode = null;
|
||||
// humanlist = new THREE.Group();
|
||||
for(let j=0; j<humanlist.children.length;j++){
|
||||
// scope.uncache(humanlist.children[j]);
|
||||
@ -520,7 +523,6 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
|
||||
// actions[an].timeScale = -1;
|
||||
// actions[an].play();
|
||||
// }
|
||||
setTimeout
|
||||
setTimeout(function(){
|
||||
initpasser();
|
||||
aiswitch = 0;
|
||||
@ -995,6 +997,9 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
|
||||
|
||||
newhuman.stage = stage;
|
||||
if(direct){
|
||||
if(direct == "top"){
|
||||
newhuman.rotation.y = Math.PI;
|
||||
}
|
||||
newhuman.direct = direct;
|
||||
}else{
|
||||
newhuman.direct = null;
|
||||
@ -1081,6 +1086,7 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
|
||||
|
||||
|
||||
toptrain = object.clone(true);
|
||||
toptrain.nowcode = null;
|
||||
toptrain.action = {
|
||||
top:[],
|
||||
down:[]
|
||||
@ -1093,6 +1099,7 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
|
||||
toptrain.curve = new THREE.CatmullRomCurve3(points1);
|
||||
|
||||
downtrain = object.clone(true);
|
||||
downtrain.nowcode = null;
|
||||
downtrain.action = {
|
||||
top:[],
|
||||
down:[]
|
||||
|
Binary file not shown.
BIN
static/model/passflow/station1.FBX
Normal file
BIN
static/model/passflow/station1.FBX
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user