删除日志

This commit is contained in:
fan 2023-05-20 13:36:18 +08:00
parent 47f55642e3
commit d5e515fbfa
182 changed files with 5 additions and 940 deletions

View File

@ -5,7 +5,6 @@ export function SetScene(project) {
// var cubeTextureLoader = new THREE.CubeTextureLoader();
var bgTexture;
// console.log(project);
if(project == "login" || project == undefined){
bgTexture = new THREE.TextureLoader().load(JL3D_LOCAL_STATIC+"/background/other.jpg");
}else if(project == "heb"){

View File

@ -50,7 +50,6 @@ export function Signalaction(){
for(let i=0;i<data.mapdata.signallist.list.length;i++){
intersects1 = raycaster.intersectObjects( data.mapdata.signallist.list[i].mesh.children);
if(intersects1[0]){
console.log(intersects1[0].object);
if(intersects1[0].object.parent.code == data.mapdata.signallist.list[i].mesh.code){
return data.mapdata.signallist.list[i].mesh;
}
@ -62,11 +61,9 @@ export function Signalaction(){
}
this.changemodel = function(jlmap3dedit,changedata){
console.log(changedata);
let isnewmodel = true;
//判断是否是未加载模型
for(let i=0;i<jlmap3dedit.assetloader.modellist.length;i++){
console.log(jlmap3dedit.assetloader.modellist[i].assetUrl);
if(changedata.assetUrl == jlmap3dedit.assetloader.modellist[i].assetUrl){
isnewmodel = false;
@ -77,25 +74,19 @@ export function Signalaction(){
let scene = jlmap3dedit.scene;
for(let i=0;i<jlmap3dedit.mapdata.signallist.list.length;i++){
if(jlmap3dedit.selectmodel.code == jlmap3dedit.mapdata.signallist.list[i].mesh.code){
console.log("change");
let num = i;
//判断是否修改模型
console.log(changedata.id );
console.log(jlmap3dedit.mapdata.signallist.list[i].mesh.name);
if(changedata.id != jlmap3dedit.mapdata.signallist.list[i].mesh.name){
if(isnewmodel == true){
console.log("new");
return jlmap3dedit.assetloader.loadnewasset(jlmap3dedit,changedata,num);
}else{
console.log("old");
return jlmap3dedit.assetloader.loadoldasset(jlmap3dedit,changedata,num);
}
}else{
console.log("same");
return jlmap3dedit.selectmodel;
}

View File

@ -48,15 +48,11 @@ export function Stationaction(){
raycaster.setFromCamera( mouse, data.camera );
let intersects1;
console.log( data.mapdata.stationstandlist);
for(let i=0;i<data.mapdata.stationstandlist.group.children.length;i++){
intersects1 = raycaster.intersectObjects( data.mapdata.stationstandlist.group.children[i].children);
if(intersects1[0]){
console.log(data.mapdata.stationstandlist.group);
console.log(intersects1[0]);
console.log(data.mapdata.stationstandlist.group.children[i]);
if(intersects1[0].object.parent.code == data.mapdata.stationstandlist.group.children[i].code){
return data.mapdata.stationstandlist.group.children[i];
}

View File

@ -55,7 +55,6 @@ export function Switchaction(){
if(intersects1[0]){
if(intersects1[0].object.code == data.mapdata.sectionlist.switchs.modellist[i].code){
//console.log(intersects1[0].object.name);
return data.mapdata.sectionlist.switchs.modellist[i];
}
}

View File

@ -1,7 +1,6 @@
//import request from '@/utils/request';
export function initDataSave(data) {
console.log(data);
let postmap = {
id:data.mapdata.id,
mapId:data.mapdata.mapId,
@ -24,7 +23,6 @@ export function initDataSave(data) {
}else{
let models = data.assetManager;
console.log(data.assetManager);
postmap.assets = JSON.stringify(models);
@ -113,7 +111,6 @@ export function initDataSave(data) {
postmap.signals = JSON.stringify(signals);
//车站
let stands = [];
console.log(data.mapdata.stationstandlist);
if(data.mapdata.stationstandlist){
for(let i=0;i<data.mapdata.stationstandlist.list.length;i++){
let station = {

View File

@ -1,6 +1,5 @@
//import request from '@/utils/request';
export function specilDataSave(data) {
console.log(data);
let postmap = {
id:data.mapdata.id,
mapId:data.mapdata.mapId,
@ -55,7 +54,6 @@ export function specilDataSave(data) {
let models = data.assetManager;
console.log(data.assetManager);
postmap.assets = JSON.stringify(models);

View File

@ -23,13 +23,11 @@ export function testgetmodels(data) {
}else{
let models = data.assetManager;
console.log(data.assetManager);
postmap.assets = JSON.stringify(models);
//section隧道
let sections = [];
// console.log(data.mapdata.sectionlist.sections.datalist);
for(let i in data.mapdata.sectionlist.sections.datalist){
let section = {
// uuid:data.mapdata.sectionlist.sections.modellist[i].uuid,
@ -47,7 +45,6 @@ export function testgetmodels(data) {
}
let nowmesh = data.mapdata.sectionlist.sectiongroup.getObjectByProperty("code",section.code);
section.railpoint = nowmesh.railpoint;
// console.log(nowmesh.railpoint);
// if(data.mapdata.sectionlist.sections.datalist[i].rsection){
// section.rsection = data.mapdata.sectionlist.sections.datalist[i].rsection;
// }

View File

@ -27,7 +27,6 @@ export function jl3dEditorLoader(mapid,scope){
get3dMapData(editmapid).then(data => {
if(data.data ){
console.log(data);
if(data.data.assets){
// initData(editmapid,data.data.id);
loadData(editmapid,data.data);
@ -40,8 +39,6 @@ export function jl3dEditorLoader(mapid,scope){
set3dMapData(params).then(data => {
if(data.code == "200"){
//console.log("创建三维数据成功");
// console.log(data);
initData(editmapid,data.data.id);
}
@ -57,9 +54,7 @@ export function jl3dEditorLoader(mapid,scope){
function initData(mapid,data3did){
getMapDetail(mapid).then(data => {
console.log(data);
let mapdata = data.data;
//console.log(data3did);
jlmap3ddata.id = data3did;
jlmap3ddata.mapId = mapid;
@ -71,11 +66,9 @@ export function jl3dEditorLoader(mapid,scope){
jlmap3ddata.switchlist = new rSwitchList();
assetloader.assetinit(scene)
.then(function(data){
//console.log(data);
return jlmap3ddata.sectionlist.initpromise(jlmap3ddata,assetloader,mapdata.sectionList,mapdata.switchList,scene);
})
.then(function(data){
//console.log(data);
return jlmap3ddata.signallist.initpromise(jlmap3ddata,mapdata.signalList,scene,assetloader);
})
.then(function(data){
@ -83,7 +76,6 @@ export function jl3dEditorLoader(mapid,scope){
})
.then(function(data){
//console.log(data);
loadingInstance.close();
});
}else{
@ -100,15 +92,12 @@ export function jl3dEditorLoader(mapid,scope){
jlmap3ddata.raillist.setrail();
assetloader.assetinit(scene)
.then(function(data){
//console.log(data);
return jlmap3ddata.stationstandlist.initpromise(jlmap3ddata,mapdata.stationList,mapdata.stationStandList,scene,assetloader);
})
.then(function(data){
//console.log(data);
return jlmap3ddata.sectionlist.initpromise(jlmap3ddata,assetloader,mapdata.sectionList,mapdata.switchList,scene);
})
.then(function(data){
//console.log(data);
return jlmap3ddata.signallist.initpromise(jlmap3ddata,mapdata.signalList,scene,assetloader);
})
.then(function(data){
@ -116,7 +105,6 @@ export function jl3dEditorLoader(mapid,scope){
})
.then(function(data){
//console.log(data);
loadingInstance.close();
});
}
@ -151,12 +139,10 @@ export function jl3dEditorLoader(mapid,scope){
assetloader.setModelListOver(jlmap3dasset.sceneAssetList,5,jlmap3dasset.others);
assetloader.assetPromiseOver(scene)
.then(function(data){
//console.log(data);
// return jlmap3ddata.sectionlist.initpromise(jlmap3ddata,assetloader,mapdata.sectionList,mapdata.switchList,scene);
return jlmap3ddata.sectionlist.loadpromise(jlmap3ddata,assetloader,sectiondata.section,mapdata.sectionList,mapdata.switchList,scene);
})
.then(function(data){
//console.log(data);
// return jlmap3ddata.signallist.initpromise(jlmap3ddata,mapdata.signalList,scene,assetloader);
return jlmap3ddata.signallist.loadpromise(signaldata,scene,assetloader,mapdata.signalList);
})
@ -165,7 +151,6 @@ export function jl3dEditorLoader(mapid,scope){
return jlmap3ddata.switchlist.loadpromise(jlmap3ddata,switchdata,scene,assetloader);
})
.then(function(data){
//console.log(data);
loadingInstance.close();
});
}else{
@ -179,7 +164,6 @@ export function jl3dEditorLoader(mapid,scope){
jlmap3ddata.switchlist = new SwitchList();
jlmap3ddata.raillist = new RailList();
console.log(netdata);
let sectiondata = JSON.parse(netdata.sections);
let switchdata = JSON.parse(netdata.switchs);
let signaldata = JSON.parse(netdata.signals);
@ -196,12 +180,10 @@ export function jl3dEditorLoader(mapid,scope){
return jlmap3ddata.stationstandlist.loadpromise(jlmap3ddata,standsdata,mapdata.stationStandList,scene,assetloader);
})
.then(function(data){
//console.log(data);
// return jlmap3ddata.sectionlist.initpromise(jlmap3ddata,assetloader,mapdata.sectionList,mapdata.switchList,scene);
return jlmap3ddata.sectionlist.loadpromise(jlmap3ddata,assetloader,sectiondata.section,scene);
})
.then(function(data){
//console.log(data);
// return jlmap3ddata.signallist.initpromise(jlmap3ddata,mapdata.signalList,scene,assetloader);
return jlmap3ddata.signallist.loadpromise(signaldata,scene,assetloader,mapdata.signalList);
})
@ -210,7 +192,6 @@ export function jl3dEditorLoader(mapid,scope){
return jlmap3ddata.switchlist.loadpromise(jlmap3ddata,switchdata,scene,assetloader);
})
.then(function(data){
//console.log(data);
loadingInstance.close();
});
}else{
@ -222,12 +203,10 @@ export function jl3dEditorLoader(mapid,scope){
return jlmap3ddata.stationstandlist.loadpromise(jlmap3ddata,standsdata,mapdata,scene,assetloader,jlmap3dasset.others);
})
.then(function(data){
//console.log(data);
// return jlmap3ddata.sectionlist.initpromise(jlmap3ddata,assetloader,mapdata.sectionList,mapdata.switchList,scene);
return jlmap3ddata.sectionlist.loadpromise(jlmap3ddata,assetloader,sectiondata.section,mapdata.sectionList,mapdata.switchList,scene);
})
.then(function(data){
//console.log(data);
// return jlmap3ddata.signallist.initpromise(jlmap3ddata,mapdata.signalList,scene,assetloader);
return jlmap3ddata.signallist.loadpromise(signaldata,scene,assetloader,mapdata.signalList);
})
@ -236,7 +215,6 @@ export function jl3dEditorLoader(mapid,scope){
return jlmap3ddata.switchlist.loadpromise(jlmap3ddata,switchdata,scene,assetloader);
})
.then(function(data){
//console.log(data);
loadingInstance.close();
});
}

View File

@ -36,7 +36,6 @@ export function rSectionList() {
if(sectiondata[i].type == "01" || sectiondata[i].type == "03"){
//初始化区段对象数据
let newsection = new SectionModel(sectiondata[i]);
// console.log(sectiondata[i]);
newsection.name = sectiondata[i].name;
newsection.code = sectiondata[i].code;
newsection.index = i;
@ -49,7 +48,6 @@ export function rSectionList() {
newsection.points = sectiondata[i].points;
newsection.pointslength = sectiondata[i].points.length-1;
newsection.railpoint = [];
// console.log(sectiondata[i].points.length);
newsection.standTrack = sectiondata[i].standTrack;
newsection.endbuild = false;
@ -74,7 +72,6 @@ export function rSectionList() {
let acode = switchdata[i].sectionACode;
let bcode = switchdata[i].sectionBCode;
let ccode = switchdata[i].sectionCCode;
// console.log(switchdata[i]);
let aposx = (scope.sections.datalist[acode].points[0].x + scope.sections.datalist[acode].points[scope.sections.datalist[acode].pointslength].x)/2;
@ -83,7 +80,6 @@ export function rSectionList() {
let aposy = (scope.sections.datalist[acode].points[0].y + scope.sections.datalist[acode].points[scope.sections.datalist[acode].pointslength].y)/2;
let cposy = (scope.sections.datalist[ccode].points[0].y + scope.sections.datalist[ccode].points[scope.sections.datalist[ccode].pointslength].y)/2;
// console.log("----------------");
if(aposx > cposx){
if(aposy < cposy){
// ——A
@ -157,8 +153,6 @@ export function rSectionList() {
y:0,
z:0
});
console.log(scope.sections.datalist);
console.log("START BUILD !!!!!!!!!!!!!!!!!");
buildsectionall(scope.sections.datalist["T1"]);
resolve("loadersection");
});
@ -246,12 +240,7 @@ export function rSectionList() {
y:0,
z:position.z
};
// console.log(origin+"******************************");
// console.log(start);
// console.log(origin);
if(scope.sections.datalist[start].standTrack == true && start != origin){
// console.log(start+"到达");
// console.log("++++++++++++++++++++++++");
return ;
}else if(scope.sections.datalist[start].rsection == undefined){
return ;
@ -420,11 +409,7 @@ export function rSectionList() {
];
}
// console.log(data.ctype);
if(type == "cross"){
// console.log(data.ctype);
// console.log(scope.sections.datalist[data.code].points.length);
// console.log(scope.sections.datalist[data.code]);
if(data.ctype == "1"||data.ctype == "2" ){
@ -769,16 +754,13 @@ export function rSectionList() {
let acode = switch2d[i].sectionACode;
let bcode = switch2d[i].sectionBCode;
let ccode = switch2d[i].sectionCCode;
// console.log(switchdata[i]);
// console.log(scope.sections.datalist[acode]);
let aposx = (scope.sections.datalist[acode].points[0].x + scope.sections.datalist[acode].points[scope.sections.datalist[acode].pointslength].x)/2;
let cposx = (scope.sections.datalist[ccode].points[0].x + scope.sections.datalist[ccode].points[scope.sections.datalist[ccode].pointslength].x)/2;
let aposy = (scope.sections.datalist[acode].points[0].y + scope.sections.datalist[acode].points[scope.sections.datalist[acode].pointslength].y)/2;
let cposy = (scope.sections.datalist[ccode].points[0].y + scope.sections.datalist[ccode].points[scope.sections.datalist[ccode].pointslength].y)/2;
// console.log("----------------");
if(aposx > cposx){
if(aposy < cposy){
// ——A

View File

@ -13,7 +13,6 @@ export function rSignalList() {
this.initpromise = function(jlmap3ddata,data,scene,assetloader,netdata){
return new Promise(function(resolve, reject){
scope.group.name = "signal";
// console.log(data);
//遍历信号数据
let netsignal = null;
let haddata = false;
@ -32,7 +31,6 @@ export function rSignalList() {
if(data[i].virtual == false){
let newsignal = new SignalModel(data[i]);
if(haddata == false){
// console.log(data[i])
let newmesh = assetloader.modellist[num].mesh.clone(true);
newmesh.name = data[i].name;
@ -154,7 +152,6 @@ export function rSignalList() {
if(data[n].virtual == false){
let newsignal = new SignalModel(signaldata[i]);
// console.log(signaldata[i]);
let newmesh = assetloader.modellist[num].mesh.clone(true);
newmesh.sectionCode = data[n].sectionCode;
newmesh.sectionOffset = data[n].sectionOffset;
@ -191,7 +188,6 @@ export function rSignalList() {
});
};
this.resetsignal = function(jlmap3ddata){
// console.log(jlmap3ddata.linksgroup);
let sectiondata = jlmap3ddata.sectionlist.sectiongroup.children;
for(let i=0;i<scope.group.children.length;i++){
let signaldata = scope.group.children[i];
@ -200,7 +196,6 @@ export function rSignalList() {
if(sectiondata[j].code == signaldata.sectionCode){
let section = sectiondata[j];
let posx = null;
// console.log(section);
posx = section.railpoint[0].x + signaldata.sectionOffset;

View File

@ -14,11 +14,9 @@ export function rSwitchList() {
};
this.initpromise = function(jlmap3ddata,data,scene,assetloader,netdata){
// console.log(jlmap3ddata);
return new Promise(function(resolve, reject){
scene.add( scope.switchgroup );
let sectiondata = jlmap3ddata.sectionlist.sections.datalist;
// console.log(sectiondata);
let num;
for(let j=0;j<assetloader.modellist.length;j++){
if(assetloader.modellist[j].deviceType == "autoswitch"){
@ -58,7 +56,6 @@ export function rSwitchList() {
return new Promise(function(resolve, reject){
scene.add( scope.switchgroup );
// let sectiondata = jlmap3ddata.sectionlist.sections.datalist;
// console.log(sectiondata);
let num;
for(let j=0;j<assetloader.modellist.length;j++){
if(assetloader.modellist[j].type == "switch"){
@ -70,7 +67,6 @@ export function rSwitchList() {
}
};
for(let i=0,leni = switchdata.length;i<leni;i++){
// console.log(switchdata[i]);
let newswitch = {
code:switchdata[i].code,
name:switchdata[i].name,
@ -79,7 +75,6 @@ export function rSwitchList() {
pc:switchdata[i].pc
};
// console.log(newswitch.pa);
let autoswitch = assetloader.modellist[num].mesh.clone(true);
autoswitch.code = switchdata[i].code;
for(let j=0;j<autoswitch.children.length;j++){
@ -101,7 +96,6 @@ export function rSwitchList() {
}
this.resetswitch = function(data){
// console.log("reset");
let sectiondata = data.sectionlist.sectiongroup;
for(let i=0;i<scope.switchs.datalist.length;i++){

View File

@ -61,12 +61,7 @@ export function RailList(){
x:circle1.position.x,
z:circle1.position.z
}];
// console.log(i);
// console.log(section[i].mesh);
// console.log(mapdata.sectionlist.sections.datalist[i].rail);
// console.log("=======================");
}
// console.log(n);
// for(let i=0;i<mapdata.switchlist.switchgroup.children.length;i++){
// var geometry = new THREE.CircleBufferGeometry( 1, 16 );
// var material = new THREE.MeshBasicMaterial( { color: 0xff00ff } );

View File

@ -13,7 +13,6 @@ export function SignalList() {
this.initpromise = function(jlmap3ddata,data,scene,assetloader,netdata){
return new Promise(function(resolve, reject){
scope.group.name = "signal";
// console.log(data);
//遍历信号数据
let netsignal = null;
let haddata = false;
@ -32,7 +31,6 @@ export function SignalList() {
if(data[i].virtual == false){
let newsignal = new SignalModel(data[i]);
if(haddata == false){
// console.log(data[i])
let newmesh = assetloader.modellist[num].mesh.clone(true);
newmesh.name = data[i].name;
@ -154,7 +152,6 @@ export function SignalList() {
if(data[n].virtual == false){
let newsignal = new SignalModel(signaldata[i]);
// console.log(signaldata[i]);
let newmesh = assetloader.modellist[num].mesh.clone(true);
newmesh.sectionCode = data[n].sectionCode;
newmesh.sectionOffset = data[n].sectionOffset;
@ -191,7 +188,6 @@ export function SignalList() {
});
};
this.resetsignal = function(jlmap3ddata){
// console.log(jlmap3ddata.linksgroup);
let sectiondata = jlmap3ddata.sectionlist.sectiongroup.children;
for(let i=0;i<scope.group.children.length;i++){
let signaldata = scope.group.children[i];
@ -200,7 +196,6 @@ export function SignalList() {
if(sectiondata[j].code == signaldata.sectionCode){
let section = sectiondata[j];
let posx = null;
// console.log(section);
posx = section.railpoint[0].x + signaldata.sectionOffset;

View File

@ -76,7 +76,6 @@ let onProgress = function ( xhr ) {
if ( xhr.lengthComputable ) {
let percentComplete = xhr.loaded / xhr.total * 100;
//console.log( Math.round( percentComplete, 2 ) + '% downloaded' );
}

View File

@ -46,7 +46,6 @@ export function SetObj(data,scope) {
if(data.sectionList[i].type == "01"){
if(data.sectionList[i].points.length>=3){
console.log(data.sectionList[i]);
for(let j=1;j<data.sectionList[i].points.length;j++){
point1 = data.sectionList[i].points[j-1];
@ -203,7 +202,5 @@ export function SetObj(data,scope) {
group.add(object);
}
console.log("setobj");
scope.exportmodel = group;
console.log(group);
}

View File

@ -15,17 +15,12 @@
var intersects4 = raycaster4.intersectObjects( helppoints[i] );
//// //console.log(raycaster1);
if(intersects1[0] != undefined){
// // //console.log("intersects1");
// // //console.log(intersects1[0]);
intersects1[0].name = "1";
mindistance = intersects1[0].distance;
result = intersects1[0];
}
if(intersects2[0] != undefined){
// // //console.log("intersects2");
// // //console.log(mindistance);
intersects2[0].name = "2";
if(mindistance == undefined){
mindistance = intersects2[0].distance;
@ -38,8 +33,6 @@
}
if(intersects3[0] != undefined){
// // //console.log("intersects3");
// // //console.log(mindistance);
intersects3[0].name = "3";
if(mindistance == undefined){
mindistance = intersects3[0].distance;
@ -50,8 +43,6 @@
}
}
if(intersects4[0] != undefined){
// // //console.log("intersects4");
// // //console.log(mindistance);
intersects4[0].name = "4";
if(mindistance == undefined){
mindistance = intersects4[0].distance;

View File

@ -18,7 +18,6 @@ function setTextVr(intersects,plane){
textplane.position.x = 0;
textplane.position.y = 1.55;
textplane.position.z = 0.01;
// console.log(textplane.position);
// textplane.tcode = data[i].code;
// textplane.rotation.y = -Math.PI/2;
// scope.textlist.push(textplane);
@ -51,7 +50,6 @@ function getTextCanvas(text){
ctx.textAlign = 'center';
ctx.textBaseline = 'middle';
ctx.clearRect(0,0,256,128);
//console.log(text.groupNumber);
ctx.drawImage(beauty,0,0,256, 128);
ctx.fillText("新的设备故障", 110,30);
ctx.fillText(text.name, 110,65);

View File

@ -183,9 +183,7 @@ export function Jl3dOtherVR(dom,group,skinCode) {
otherVrViewWorker.onmessage = function (event) {
// maintainerHuman
console.log(event.data);
if(event.data.type == "VR_Sync_3D"){
console.log(event.data);
humanMove(event.data);
@ -268,8 +266,6 @@ export function Jl3dOtherVR(dom,group,skinCode) {
}
if(event.data.type == "takeDownTrain"){
console.log(event.data);
console.log(stationList);
for(let i=0,leni=stationList.length;i<leni;i++){
if(stationList[i].code == event.data.stationcode){
scope.nowstation = stationList[i];
@ -294,8 +290,6 @@ export function Jl3dOtherVR(dom,group,skinCode) {
}
if(event.data.type == "topTrain"){
console.log(event.data);
console.log(trainControl.toptrain.status);
if(trainControl.toptrain.status != 1){
trainControl.toptrain.position.copy(trainControl.toptrain.curve.getPointAt(event.data.offset));
}
@ -310,8 +304,6 @@ export function Jl3dOtherVR(dom,group,skinCode) {
if(event.data.type == "topTrainDoor"){
console.log(event.data);
if(event.data.open == "0"){
trainControl.closetraindoor(trainControl.toptrain,event.data.doorCode,"top");
// trainLeaveStation("top");
@ -527,7 +519,6 @@ export function Jl3dOtherVR(dom,group,skinCode) {
// }
// 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);
@ -602,7 +593,6 @@ export function Jl3dOtherVR(dom,group,skinCode) {
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){
@ -666,7 +656,6 @@ export function Jl3dOtherVR(dom,group,skinCode) {
}
}
console.log(stationList);
scope.nowstation = stationList[0];
let stationworket = {
type:'station',
@ -676,7 +665,6 @@ export function Jl3dOtherVR(dom,group,skinCode) {
}
// console.log(scope.nowstation);
}
@ -751,7 +739,6 @@ export function Jl3dOtherVR(dom,group,skinCode) {
}
function humanMove(movedata){
console.log(maintainerHuman);
let distance = Math.sqrt(Math.pow(movedata.body.pos.x - maintainerGroup.position.x, 2) + Math.pow(movedata.body.pos.y - maintainerGroup.position.y, 2) + Math.pow(movedata.body.pos.z - maintainerGroup.position.z, 2));
if(distance <5){
@ -789,8 +776,6 @@ export function Jl3dOtherVR(dom,group,skinCode) {
}
function setTextVr(intersects,plane){
console.log(intersects);
console.log(plane);
if(intersects.text){
let textgeometry = new THREE.PlaneBufferGeometry( 1.2, 0.8, 1 );
let textt = new THREE.CanvasTexture(getTextCanvas(intersects));
@ -809,7 +794,6 @@ export function Jl3dOtherVR(dom,group,skinCode) {
textplane.position.x = 0;
textplane.position.y = 1.55;
textplane.position.z = 0.01;
// console.log(textplane.position);
// textplane.tcode = data[i].code;
// textplane.rotation.y = -Math.PI/2;
// scope.textlist.push(textplane);
@ -842,7 +826,6 @@ export function Jl3dOtherVR(dom,group,skinCode) {
ctx.textAlign = 'center';
ctx.textBaseline = 'middle';
ctx.clearRect(0,0,256,128);
//console.log(text.groupNumber);
ctx.drawImage(beauty,0,0,256, 128);
ctx.fillText("新的设备故障", 110,30);
ctx.fillText(text.name, 110,65);

View File

@ -54,7 +54,6 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) {
// this.renderer.shadowMap.type = THREE.PCFSoftShadowMap;
this.renderer.gammaInput = true;
this.renderer.gammaOutput = true;
console.log( this.renderer);
this.renderer.vr.enabled = true;
this.dom.appendChild(this.renderer.domElement);
document.body.appendChild( VRButton.createButton( human,{x:25,y:1.3,z:1},this.renderer ) );
@ -139,7 +138,6 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) {
let timer=setInterval(function(){
if(TrainRescueStatic.other.mesh){
console.log(TrainRescueStatic);
scope.scene.add(TrainRescueStatic.animatemodel.mesh);
scope.scene.add(TrainRescueStatic.controlmodel.mesh);
scope.scene.add(TrainRescueStatic.floorplane.mesh);
@ -150,7 +148,6 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) {
// controller1.add(handrBox);
controller1.add( TrainRescueStatic.handR.mesh );
console.log(TrainRescueStatic.controlmodel.mesh);
// floors.push(TrainRescueStatic.floorplane.mesh);
animate();
@ -209,8 +206,6 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) {
}
function onSelectStart( event ) {
// console.log();
console.log("select");
var controller = event.target;
var intersections = getIntersections( controller );
@ -252,7 +247,6 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) {
let controlMoveSwitch = false;
let nowControlModel = null;
function squeezeStart(){
console.log("squeezestart");
TrainRescueStatic.handR.action.reset();
TrainRescueStatic.handR.action.time = TrainRescueStatic.handR.action._clip.duration;
TrainRescueStatic.handR.action.timeScale = 1;
@ -275,7 +269,6 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) {
}
function squeezeEnd(){
console.log("squeezeend");
TrainRescueStatic.handR.action.reset();
TrainRescueStatic.handR.action.time = 0;
TrainRescueStatic.handR.action.timeScale = -1;
@ -297,7 +290,6 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) {
}
// for(let i=0;i<1;i++){
// let rayObject = raycastervr.intersectObject( floors[i]);
// console.log(rayObject);
// if(rayObject.length>0){
// return rayObject;
// }
@ -315,7 +307,6 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) {
if ( intersections) {
var intersection = intersections[ 0 ];
// console.log(intersection);
var object = intersection.object;
circle.position.set( intersection.point.x, intersection.point.y+0.2, intersection.point.z );
}
@ -394,13 +385,8 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) {
let animateStage = "0";
function updateControlModel(){
if(controlMoveSwitch == true){
console.log(nowControlModel.name);
console.log(TrainRescueStatic.animatemodel.action.time);
// console.log(nowControlModel);
// console.log(TrainRescueStatic.handR.mesh);
let originPoint = new THREE.Vector3(nowControlModel.matrixWorld.elements[12],nowControlModel.matrixWorld.elements[13],nowControlModel.matrixWorld.elements[14]);
let overPoint = new THREE.Vector3(TrainRescueStatic.handR.mesh.matrixWorld.elements[12],TrainRescueStatic.handR.mesh.matrixWorld.elements[13],TrainRescueStatic.handR.mesh.matrixWorld.elements[14]);
// console.log(originPoint);
// rad *= ( endNorm.cross( startNorm ).dot( eye ) < 0 ? 1 : -1);
if(nowControlModel.name == "5"){
@ -408,7 +394,6 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) {
let v2 = new THREE.Vector3(overPoint.z-originPoint.z,overPoint.y-originPoint.y,overPoint.x-originPoint.x);
let rad = v1.angleTo(v2);
console.log(rad);
if(rad>0.725 && rad<2.37){
if(TrainRescueStatic.animatemodel.action.time >= 7.8 && TrainRescueStatic.animatemodel.action.time <20){
animateStage = "3";
@ -510,7 +495,6 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) {
let rad = v1.angleTo(v2);
if(rad>0.546 && rad<2.4){
if(TrainRescueStatic.animatemodel.action.time>=2.6 && TrainRescueStatic.animatemodel.action.time<5.2){
console.log(animateStage);
animateStage = "1";
if(rad>1.3){
if(controlStage == false){
@ -604,7 +588,6 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) {
textplane.position.x = 0;
textplane.position.y = 1.55;
textplane.position.z = 0.01;
// console.log(textplane.position);
// textplane.tcode = data[i].code;
// textplane.rotation.y = -Math.PI/2;
// scope.textlist.push(textplane);
@ -637,7 +620,6 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) {
ctx.textAlign = 'center';
ctx.textBaseline = 'middle';
ctx.clearRect(0,0,256,128);
//console.log(text.groupNumber);
ctx.drawImage(beauty,0,0,256, 128);
ctx.fillText("新的设备故障", 110,30);
ctx.fillText(text.name, 110,65);

View File

@ -200,7 +200,6 @@ export function JLmap3dMaintainer(dom, data,skinCode,storemod,routegroup,project
if(camerarail.moveswitch == true){
// console.log(camerarail.progress);
if(camerarail.progress>=0.99){
camerarail.moveswitch = false;
camerarail.curve = null;
@ -222,7 +221,6 @@ export function JLmap3dMaintainer(dom, data,skinCode,storemod,routegroup,project
delta = clock.getDelta();
for(let i=scope.mixers.length-1;i>=0;i--){
if(scope.mixers[i]._actions[0].isRunning()){
// console.log(scope.mixers[i]._actions[0].isRunning());
scope.mixers[i].update( delta );
}
}
@ -249,7 +247,6 @@ export function JLmap3dMaintainer(dom, data,skinCode,storemod,routegroup,project
scope.mixers = null;
scope.actions = null;
scope.Subscribe = null;
//console.log(scope);
//scope = null;
}
@ -320,7 +317,6 @@ export function JLmap3dMaintainer(dom, data,skinCode,storemod,routegroup,project
};
this.eventoff = function(){
//console.log("off");
//raycaster交互模型点击事件
document.getElementById("testjlmap3d").removeEventListener( "mousedown", onselect, false );
//窗口自适应
@ -328,7 +324,6 @@ export function JLmap3dMaintainer(dom, data,skinCode,storemod,routegroup,project
};
this.updatecamera = function(mesh,type){
//console.log(mesh);
if(type == "station"){
camera.position.x = mesh.position.x;
camera.position.y = mesh.position.y+800;
@ -398,13 +393,9 @@ export function JLmap3dMaintainer(dom, data,skinCode,storemod,routegroup,project
if(intersects[0]){
for(let j=0;j<trainlisttest.list.length;j++){
if(intersects[0].object.name == trainlisttest.list[j].name){
// console.log(trainlisttest.list[j].position.x);
// console.log(trainlisttest.list[j].position.y);
// console.log(trainlisttest.list[j].children[2].matrixWorld.elements[14]);
camera.position.x = trainlisttest.list[j].position.x;
camera.position.y = 200;
camera.position.z = trainlisttest.list[j].children[2].matrixWorld.elements[14]+300;
//console.log(camera.position);
controls.target = new THREE.Vector3(trainlisttest.list[j].children[2].matrixWorld.elements[12],trainlisttest.list[j].children[2].matrixWorld.elements[13],trainlisttest.list[j].children[2].matrixWorld.elements[14]);
controls.update();
}
@ -414,10 +405,8 @@ export function JLmap3dMaintainer(dom, data,skinCode,storemod,routegroup,project
if(scope.raycasterswitch == "section"){
//console.log(sectionlist.sections.modellist);
let intersects = raycaster.intersectObjects( linklist.linksgroup.children,true);
if(intersects[0]){
// console.log(intersects[0].object);
scope.helpbox = new THREE.BoxHelper( intersects[0].object, 0xff0000 );
scene.add( scope.helpbox );
}
@ -427,7 +416,6 @@ export function JLmap3dMaintainer(dom, data,skinCode,storemod,routegroup,project
let intersects = raycaster.intersectObjects( signallist.group.children,true);
if(intersects[0]){
// console.log(intersects[0].object.matrixWorld);
scope.helpbox = new THREE.BoxHelper( intersects[0].object, 0xff0000 );
scene.add( scope.helpbox );
}

View File

@ -135,7 +135,6 @@ export function MaintainerLoad(data,scope,netdata,mapdata,camera,controls,scene)
// if(scope.assetloader.modellist[mn].name && scope.assetloader.modellist[mn].name == "suidao"){
// // scope.assetloader.modellist[mn].mesh.rotation.x = Math.PI/2;
// // scope.assetloader.modellist[mn].mesh.position.y -=0.1;
// // console.log(scope.assetloader.modellist[mn].mesh);
// scene.add(scope.assetloader.modellist[mn].mesh);
// }
// }
@ -155,7 +154,6 @@ export function MaintainerLoad(data,scope,netdata,mapdata,camera,controls,scene)
if ( xhr.lengthComputable ) {
let percentComplete = xhr.loaded / xhr.total * 100;
//console.log( 'model ' + Math.round( percentComplete, 2 ) + '% downloaded' );
}

View File

@ -17,9 +17,7 @@ export function PasserAi(zone,finder) {
let targetPosition = new THREE.Vector3();
//生成下车出站人物
this.passerout = function(direct){
// console.log(direct);
if(direct == "top"){
// console.log("toppasser");
scope.toppasseron = true;
setTimeout(function(){
scope.toppasseron = false
@ -31,7 +29,6 @@ export function PasserAi(zone,finder) {
}, 5000);
}
if(direct == "down"){
// console.log("downpasser");
scope.downpasseron = true;
setTimeout(function(){
scope.downpasseron = false;
@ -71,7 +68,6 @@ export function PasserAi(zone,finder) {
//人物站台阶段更新
this.aiUpdate = function(humanlist,passerHuman,passerCheckDoor,deviceaction){
for(let i=0;i<humanlist.children.length;i++){
// console.log(humans[i]);
if(humanlist.children[i].status == 0){
//stage = 0 进入车站
@ -87,7 +83,6 @@ export function PasserAi(zone,finder) {
points.push(new THREE.Vector3(path[i].x,path[i].y,path[i].z));
}
passerHuman.initMoveAnimate(humanlist.children[i],i,points,i);
// console.log(path);
}
//stage = 1 前往进站闸机
@ -120,7 +115,6 @@ export function PasserAi(zone,finder) {
if(humanlist.children[i].stage == 3){
let direct = Math.floor(Math.random()*(2))+1;
// console.log(direct);
let points = [];
points.push(new THREE.Vector3(humanlist.children[i].position.x,humanlist.children[i].position.y,humanlist.children[i].position.z));
// points.push(new THREE.Vector3(11.81,9.8,13.11));
@ -178,7 +172,6 @@ export function PasserAi(zone,finder) {
}else{
passerHuman.initMoveAnimate(humanlist.children[i],i,points,i);
}
// console.log(points);
}
}

View File

@ -125,7 +125,6 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
stationList.push(mapnetdata.stationList[i]);
}
}
// console.log(mapnetdata.stationList);
});
@ -149,7 +148,6 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
function callback(Response) {
let data = JSON.parse(Response.body);
console.log(data);
if(data.srSignal){
if(data.srSignal[0] == scope.nowcode){
@ -227,7 +225,6 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
for (let i = 0; i < scope.mixers.length; i++) {
if (scope.mixers[i]) {
if( scope.mixers[i].staticType){
// console.log(scope.mixers[i].time);
if(scope.mixers[i]._actions[0].time<stopTime){
scope.mixers[i].update(delta);
}else{
@ -399,8 +396,6 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
let switchActionMode = true;
this.changeAnimate = function(type){
// console.log(scope.modelmanager.staticswitchmodel);
// scope.modelmanager.staticswitchmodel.action["2kai"].reset();
// scope.modelmanager.staticswitchmodel.action["5jiasuo"].reset();
// scope.modelmanager.staticswitchmodel.action["8shunyao"].reset();
@ -424,8 +419,6 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
scope.modelmanager.staticswitchmodel.action.time = 0;
stopTime = 3.33;
scope.modelmanager.staticswitchmodel.action.play();
console.log(scope.mixers);
}
if(type == "action2"){
scope.camera.position.x = -7.23;
@ -489,8 +482,6 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
scope.camera.position.y = 22.56;
scope.camera.position.z = -1.348;
scope.controls.target = new THREE.Vector3(-2.15,10,-1.348);
// console.log(scope.camera.position);
// console.log(scope.controls.target);
scope.modelmanager.staticswitchmodel.action.reset();
scope.modelmanager.staticswitchmodel.action.time = 23.36;
stopTime = 26.66;

View File

@ -139,7 +139,6 @@ export function ModelManager(){
Promise.all(initlist).then((result) => {
resolve("success"); //['成功了', 'success']
}).catch((error) => {
//console.log(error);
});
});

View File

@ -199,7 +199,6 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
getPublishMapDetail(mapId).then(data => {
let mapnetdata = data.data;
getPublish3dMapDetail(mapId).then(netdata => {
// console.log(netdata);
let assetsdata = JSON.parse(netdata.data.sections);
scope.datatype = "new";
@ -314,7 +313,6 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
// };
updatemmi.updatedrivingcode = function(code) {
// console.log(trainlisttest);
drivingcode = code;
trainlisttest.group.children[0].children[0].add(controls3.getObject());
controls3.getObject().position.x = 10;
@ -440,7 +438,6 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
};
this.eventoff = function() {
// console.log("off");
// raycaster交互模型点击事件
document.getElementById('jlsimulation').removeEventListener( 'mousedown', onselect, false );
// 窗口自适应
@ -459,7 +456,6 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
camera.position.z = mesh.children[0].position.z;
// controls.target = new THREE.Vector3(mesh.position.x,0,mesh.children[0].position.z);
}
// console.log(mesh);
if (type == 'station') {
camera.position.x = mesh.position.x;
camera.position.y = mesh.position.y+800;
@ -532,7 +528,6 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
}
if (scope.raycasterswitch == 'section') {
// console.log(sectionlist.sections.modellist);
let intersects = raycaster.intersectObjects( sectionlist.sections.modellist, true);
if (intersects[0]) {

View File

@ -115,7 +115,6 @@ export function AssetLoader(){
resolve("loaderassets"); //['成功了', 'success']
}).catch((error) => {
//console.log(error);
});
});
@ -135,7 +134,6 @@ export function AssetLoader(){
resolve("loaderassets"); //['成功了', 'success']
}).catch((error) => {
//console.log(error);
});
});
@ -170,45 +168,31 @@ export function AssetLoader(){
fbxpromise(signal)
.then(function(data){
////console.log(data);
// console.log("test");
return fbxpromise(train);
})
.then(function(data){
////console.log(data);
// console.log("test");
return fbxpromise(station);
})
.then(function(data){
////console.log(data);
// console.log("test");
return fbxpromise(wstation);
})
// .then(function(data){
// ////console.log(data);
// return fbxpromise(autorail);
// })
// .then(function(data){
// ////console.log(data);
// return fbxpromise(autosuidao);
// })
.then(function(data){
////console.log(data);
// console.log("defaultswitch1");
return fbxpromise(defaultswitch1);
})
.then(function(data){
// console.log("defaultswitch2");
////console.log(data);
return fbxpromise(defaultswitch2);
})
.then(function(data){
////console.log(data);
// console.log("autoswitchs");
return fbxpromise(autoswitchs);
})
.then(function(data){
////console.log(scope.modellist);
resolve("loaderassets");
});
});
@ -228,7 +212,6 @@ export function AssetLoader(){
let newmesh = object;
//let mixer = new THREE.AnimationMixer( newmesh );
////console.log(jlmap3ddata.sectionlist);
for(let i=0;i<newmesh.children.length;i++){
let name = newmesh.children[i].name.split("_");
@ -314,7 +297,6 @@ export function AssetLoader(){
scene.add(newmesh);
loadingInstance.close();
//console.log("add");
} );
}
@ -414,7 +396,6 @@ export function AssetLoader(){
function fbxPromiseOver(asset){
return new Promise(function(resolve, reject){
var loader = new THREE.FBXLoader();
console.log(asset);
if(asset.type == "static"){
loader.load(asset.url, function ( object ) {
let mixer = new THREE.AnimationMixer( object );

View File

@ -15,10 +15,6 @@ import { Loading } from 'element-ui';
// import {SwitchModel} from '@/jlmap3d/model/SwitchModel.js';
export function DriverLoadNew(data,scope,netdata,mapdata,sectionlist,signallist,switchlist,stationstandlist,trainlisttest,rails,camera,controls,scene,mixerss){
//console.log(mapdata);
//console.log(data);
//console.log(scope);
let sceneload = scene;
let backdata = scope;
let assetloader = scope.assetloader;
@ -33,15 +29,12 @@ export function DriverLoadNew(data,scope,netdata,mapdata,sectionlist,signallist,
let isNewdata = false;
if(netdata.assets){
let assetsdata = JSON.parse(netdata.sections);
// console.log(assetsdata.link);
if(assetsdata.link){
isSection = true;
}else{
isNewdata = true;
}
}
// console.log(isNewdata);
// console.log(netdata);
if(isNewdata == true){
initnew3d(data,netdata);
}else{
@ -100,9 +93,6 @@ export function DriverLoadNew(data,scope,netdata,mapdata,sectionlist,signallist,
return trainlisttest.drivertrain(mapdata.trainList,sceneload,assetloader,mixers,actions,"01");
})
// .then(function(data){
// //console.log(data);
// //console.log(assetloader);
// console.log(stationstandlist);
// return tdt.initTdt(stationstandlist.list,mapdata.sectionList,rails.sectionrail,sceneload);
// })
.then(function(data){

View File

@ -12,8 +12,6 @@ export function RailListN(){
};
// this.init = function(section,linklist,scene){
this.init = function(section,sectionList,switchdata,scene){
// console.log(section);
// console.log(switchdata);
for(let i=0;i<section.length;i++){
scope.sectionrail[section[i].code] = {
lp:section[i].lp,
@ -176,7 +174,6 @@ export function RailListN(){
// circle2.rotation.x = -Math.PI/2;
// scene.add( circle1 );
// scene.add( circle2 );
// console.log(scope.sectionrail[section[i].code]);
}else{
scope.sectionrail[section[i].code].standTrack = false;
}
@ -186,8 +183,6 @@ export function RailListN(){
// var geometry = new THREE.CircleGeometry( 0.05, 16 );
// var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
// var circle = new THREE.Mesh( geometry, material );
// // console.log(n);
// // console.log(scope.sectionrail[section[i].code].lineleft.points[n]);
// circle.position.x = scope.sectionrail[section[i].code].lineleft.points[n].x;
// circle.position.y = scope.sectionrail[section[i].code].lineleft.points[n].y;
// circle.position.z = scope.sectionrail[section[i].code].lineleft.points[n].z;
@ -245,8 +240,6 @@ export function RailListN(){
// var geometry = new THREE.CircleGeometry( 0.05, 16 );
// var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
// var circle = new THREE.Mesh( geometry, material );
// // console.log(n);
// // console.log(scope.sectionrail[section[i].code].lineleft.points[n]);
// circle.position.x = scope.sectionrail[sectioncode].lineleft.points[n].x;
// circle.position.y = scope.sectionrail[sectioncode].lineleft.points[n].y;
// circle.position.z = scope.sectionrail[sectioncode].lineleft.points[n].z;

View File

@ -49,7 +49,6 @@ this.loadpromise = function(sectionList,sectiondata,rails,scene,assetloader){
// autorail.leftlist = leftlist;
scene.add(scope.sectiongroup);
return new Promise(function(resolve, reject){
// console.log(sectiondata);
let mergegeometry = new THREE.Geometry();
for(let i=0,leni = sectiondata.length;i<leni;i++){
@ -101,7 +100,6 @@ this.loadpromise = function(sectionList,sectiondata,rails,scene,assetloader){
// testmesh2 = null;
if(newsection.railpoint.length>=3){
// console.log(newsection);
let height = Math.random()/1000;
var closedSpline;

View File

@ -37,7 +37,6 @@ export function SignalListN() {
for(let j=0,lenj = data.length;j<lenj;j++){
if(data[j].code == signaldata[i].code){
if(data[j].virtual == false){
// console.log(signaldata[i]);
let newsignal = new SignalModel(signaldata[i]);
let newmesh;
if(data[j].type == "ARRIVAL"){

View File

@ -135,14 +135,12 @@ export function StationStandListN() {
}
this.loadpromise = function(stationdata,standsdata,psddata,scene,assetloader,mixers,actionss,mode,otherStation){
return new Promise(function(resolve, reject){
// console.log(standsdata);
let stations = stationdata;
let selectmesh1;
let selectmesh2;
let selectmesh3;
let specilmesh;
for(let j=0;j<assetloader.modellist.length;j++){
// console.log(assetloader.modellist[j].type);
if(assetloader.modellist[j].type == "stationInside"){
selectmesh1 = assetloader.modellist[j].mesh;
}
@ -202,7 +200,6 @@ export function StationStandListN() {
}
//
//
// console.log(psddata);
for(let i=0;i<standsdata.length;i++){
@ -268,8 +265,6 @@ export function StationStandListN() {
newstationmesh.code = standsdata[i].code;
newstationmesh.name = standsdata[i].code;
// console.log(newstationmesh.name);
// console.log(standsdata[i].inside);
newstationmesh.inside = standsdata[i].inside;
newstationmesh.position.x = standsdata[i].position.x;
newstationmesh.position.y = standsdata[i].position.y;

View File

@ -17,7 +17,6 @@ export function SwitchListN() {
return new Promise(function(resolve, reject){
scene.add( scope.switchgroup );
// let sectiondata = jlmap3ddata.sectionlist.sections.datalist;
// console.log(sectiondata);
let num;
for(let j=0;j<assetloader.modellist.length;j++){
if(assetloader.modellist[j].type == "switch"){
@ -25,7 +24,6 @@ export function SwitchListN() {
}
};
for(let i=0,leni = switchdata.length;i<leni;i++){
// console.log(switchdata[i]);
let newswitch = {
code:switchdata[i].code,
name:switchdata[i].name,
@ -58,7 +56,6 @@ export function SwitchListN() {
actions[autoswitch.code].action.clampWhenFinished = true;
mixers.push(mixer);
}
// console.log(scope.switchs.modellist);
resolve("loadedswitch");
});

View File

@ -17,7 +17,6 @@ export function TdtList() {
stopSections[sectionData[i].code] = sectionData[i];
}
}
// console.log(stationData);
for(let k in stationData){
for(let i=0;i<stationData[k].stands.length;i++){
let newmesh = object.clone(true);
@ -90,7 +89,6 @@ export function TdtList() {
ctx.textAlign = 'center';
ctx.textBaseline = 'middle';
ctx.clearRect(0,0,128,64);
//console.log(text.groupNumber);
ctx.drawImage(beauty,0,0,128, 64);
ctx.fillText(text, 64,32);
return canvas;

View File

@ -60,8 +60,6 @@ export function TrainListN() {
}
this.removeDriveTrain = function(removeLength){
console.log(removeLength);
scope.group.remove(scope.otherTrainmodels[0]);
scope.otherTrainmodels.splice(0,removeLength);
}
@ -69,7 +67,6 @@ export function TrainListN() {
this.drivertrain = function(data,scene,assetloader,mixers,actionss,mode){
return new Promise(function(resolve, reject){
// console.log(data);
let selectmesh,ntracks1,ntracks2,tclip,fclip;
for(let n=assetloader.modellist.length-1;n>=0;n--){
@ -105,15 +102,12 @@ export function TrainListN() {
newmesh.mixer = [];
for(let j=0;j<newmesh.children.length;j++){
// console.log("===================");
for(let n=0,lenn = newmesh.children[j].children.length;n<lenn;n++){
if(newmesh.children[j].children[n].name == "top"){
newmesh.children[j].children[n].animations = [];
newmesh.children[j].children[n].animations.push(tclip.clone());
let mixer = new THREE.AnimationMixer( newmesh.children[j].children[n] );
// console.log(n);
// console.log(newmesh.children[j].children[n]);
newmesh.mixer.push(mixer);
newmesh.mixerpush = false;
@ -151,7 +145,6 @@ export function TrainListN() {
// pos.position.x = -73.5;
// newmesh.children[j].add( pos );
newmesh.children[j].rotalist = [];
// console.log(newmesh);
}
newmesh.first = false;
@ -214,7 +207,6 @@ export function TrainListN() {
} );
//遍历列车数据
// console.log(data.length);
for(let i=0;i<data.length;i++){
@ -224,19 +216,14 @@ export function TrainListN() {
};
let newmesh = selectmesh.clone(true);
newmesh.mixer = [];
// console.log("-------------------------");
// console.log(data[i]);
for(let j=0;j<newmesh.children.length;j++){
// console.log("===================");
for(let n=0,lenn = newmesh.children[j].children.length;n<lenn;n++){
if(newmesh.children[j].children[n].name == "top"){
newmesh.children[j].children[n].animations = [];
newmesh.children[j].children[n].animations.push(tclip.clone());
let mixer = new THREE.AnimationMixer( newmesh.children[j].children[n] );
// console.log(n);
// console.log(newmesh.children[j].children[n]);
newmesh.mixer.push(mixer);
newmesh.mixerpush = false;
// mixers.push(mixer);
@ -274,7 +261,6 @@ export function TrainListN() {
// pos.position.x = -73.5;
// newmesh.children[j].add( pos );
newmesh.children[j].rotalist = [];
// console.log(newmesh);
}
//
@ -343,7 +329,6 @@ export function TrainListN() {
scope.list[data[i].groupNumber] = newmesh;
//scene.add(newmesh);
}
// console.log(selectmesh);
// for(let i=0,leni=selectmesh.children.length;i<leni;i++){
// selectmesh.children[i].geometry.dispose();
// selectmesh.children[i].material.dispose();
@ -361,7 +346,6 @@ let onProgress = function ( xhr ) {
if ( xhr.lengthComputable ) {
let percentComplete = xhr.loaded / xhr.total * 100;
console.log( Math.round( percentComplete, 2 ) + '% downloaded' );
}
@ -389,7 +373,6 @@ function getTextCanvas(text){
ctx.textAlign = 'center';
ctx.textBaseline = 'middle';
ctx.clearRect(0,0,128,64);
//console.log(text.groupNumber);
ctx.drawImage(beauty,0,0,128, 64);
ctx.fillText("车组号:"+text.groupNumber, 40,10);
ctx.fillText("车组人员:XXX", 40,20);

View File

@ -38,7 +38,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
var datatype = '00';
this.teststomp = new StompClient();
// let toppic = '/app/topic/simulation/client/'+routegroup+'/drive';
console.log(routegroup);
this.topic = '/queue/simulation/'+routegroup+'/trainPosition';
let allDeviceTopic = '/queue/simulation/'+routegroup+'/srDeviceState';
let hmiTopic = '/queue/simulation/'+routegroup+'/train/001/Hmi';
@ -52,8 +51,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
//切换车辆修改列车属性
this.updatamap = function(newsectionlist,newlinklist,newsignallist,newstationstandlist,newtrainlisttest,newrealsectionlist,newrails,newtdt, materiallist, nowaction, scene) {
// console.log(mapdata);
// console.log(newtrainlisttest);
trainmodel = newtrainlisttest.group.children[0];
trainlisttest = newtrainlisttest;
sectionlist = newsectionlist;
@ -102,7 +99,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
let initStatus = true;
// 仿真socket接口回调函数
function callback(Response) {
// console.log(Response);
// 对象化数据
let data = JSON.parse(Response.body);
@ -131,7 +127,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
}
// stats.update();
// 遍历后台数据
// console.log(data);
}

View File

@ -55,12 +55,9 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
jsonwebwork.onmessage = function (event) {
// console.log(event.data);
// if(event.data.deviceType == "TRAIN"){
// // console.log(event.data);
//
// }
// console.log(event.data);
if(event.data.type == "Device_Load_Destroy_3D"){
DeviceDestroy(event.data);
return;
@ -69,19 +66,16 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
if(event.data.type == 'TrainRun_3D'){
for(let i=0,leni=event.data.body.length;i<leni;i++){
// console.log(event.data.body[i]);
trainRunNew(event.data.body[i]);
}
return;
}
// if(event.data.type == 'TRAIN'){
// console.log(event.data);
// trainrun(event.data);
// }
if (event.data.type== 'SIGNAL' && signallist) {
signalupdate(event.data);
// console.log(event.data);
return;
}
@ -131,7 +125,6 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
this.socketon = function(topic) {
try {
// console.log("teststomp");
// scope.teststomp.subscribe(topic, callback, header);
} catch (error) {
console.error('websocket订阅失败');
@ -166,11 +159,9 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
function trainRunNew(data){
let code = data.code;
// console.log(rails.sectionrail[data.section],data.section,code,'--------')
if(rails.sectionrail[data.section]){
if(trainlisttest.list[code].right != data.right){
if(data.right == "0"){
console.log('right==0')
trainlisttest.list[code].right = "0";
trainlisttest.list[code].rotation.y = Math.PI;
let point = rails.sectionrail[data.section].lineleft.getPointAt(data.offset);
@ -212,7 +203,6 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
}
if(data.right == "1"){
console.log('right==1')
trainlisttest.list[code].right = "1";
trainlisttest.list[code].rotation.y = 0;
let point = rails.sectionrail[data.section].lineleft.getPointAt(data.offset);
@ -252,10 +242,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
}
}
// console.log(data);
console.log(trainlisttest.list[code].dispose,'88888888');
if(trainlisttest.list[code].dispose == "0") {
console.log(trainlisttest.list[code].dispose,'-----------');
if (data.right == '1') { // 向右
trainlisttest.list[code].right = '1';
trainlisttest.list[code].progress = data.offset;
@ -310,7 +297,6 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
}
// if(trainlisttest.list[code].children[1].rotalist.length > 0 || trainlisttest.list[code].children[2].rotalist.length > 0 || trainlisttest.list[code].children[3].rotalist.length > 0 || trainlisttest.list[code].children[4].rotalist.length > 0|| trainlisttest.list[code].children[5].rotalist.length > 0){
for(let rs = 1;rs<trainlisttest.list[code].children.length;rs++){
//console.log(rs);
if(trainlisttest.list[code].children[rs].rotalist[0]){
let offsetz = parseFloat(trainlisttest.list[code].children[rs].rotalist[0].posr.z) - parseFloat(trainlisttest.list[code].children[rs].matrixWorld.elements[14]);
trainlisttest.list[code].children[rs].position.z += offsetz;
@ -320,9 +306,6 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
for(let xh=0;xh<trainlisttest.list[code].children[rs].rotalist.length;xh++){
if((trainlisttest.list[code].children[rs].matrixWorld.elements[12])>=trainlisttest.list[code].children[rs].rotalist[0].posr.x){
// if(trainlisttest.list[code].groupNumber == "005"){
// console.log("rs:"+rs);
// console.log(trainlisttest.list[code].children[rs].matrixWorld.elements[12]);
// console.log(trainlisttest.list[code].children[rs].rotalist[0].posr.x);
// }
if(rs != (trainlisttest.list[code].children.length-1)){
let asd = trainlisttest.list[code].children[rs].rotalist[0];
@ -338,7 +321,6 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
xh = trainlisttest.list[code].children[rs].rotalist.length;
}
}
//console.log(trainlisttest.list[code].children[rs].rotalist.length);
}
}
// }
@ -402,7 +384,6 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
// if(trainlisttest.list[code].children[1].rotalist.length > 0 || trainlisttest.list[code].children[2].rotalist.length > 0 || trainlisttest.list[code].children[3].rotalist.length > 0 || trainlisttest.list[code].children[4].rotalist.length > 0|| trainlisttest.list[code].children[5].rotalist.length > 0){
for(let rs = 1;rs<trainlisttest.list[code].children.length;rs++){
//console.log(rs);
if(trainlisttest.list[code].children[rs].rotalist[0]){
let offsetz = parseFloat(trainlisttest.list[code].children[rs].rotalist[0].posr.z) + parseFloat(trainlisttest.list[code].children[rs].position.z);
@ -426,28 +407,23 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
xh = trainlisttest.list[code].children[rs].rotalist.length;
}
}
//console.log(trainlisttest.list[code].children[rs].rotalist.length);
}
}
// console.log(trainlisttest.list[code].rotalist);
// }
}
}
console.log(code,trainlisttest.list[code].position.x,trainlisttest.list[code].position.y,trainlisttest.list[code].position.z, '666666')
}else{
// console.log(code,'trainlisttest.list[code].position.x = -1000000')
trainlisttest.list[code].position.x = -1000000;
}
}
function trainrun(data){
let code = data.code;
// console.log(data);
if(trainlisttest.list[code].dispose == "0"){
if(trainlisttest.list[code].curve == null){
if (data.right == '1') { // 向右

View File

@ -128,7 +128,6 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) {
}
weatherManager.update(controlManager.orbitCamera.position);
// console.log(controlManager.orbitCamera.position);
// stats.update();
}
@ -147,14 +146,12 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) {
delta = clock.getDelta();
for(let i=scope.mixers.length-1;i>=0;i--){
if(scope.mixers[i]._actions[0].isRunning()){
// console.log(scope.mixers[i]._actions[0].isRunning());
scope.mixers[i].update( delta );
}
}
//开启车站漫游
if(camerarail.moveswitch == true){
// console.log(camerarail.progress);
if(camerarail.progress>=0.99){
camerarail.moveswitch = false;
camerarail.curve = null;
@ -193,7 +190,6 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) {
scope.mixers = null;
scope.actions = null;
scope.Subscribe = null;
//console.log(scope);
//scope = null;
}
@ -224,7 +220,6 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) {
}
};
this.changeweather = function(weathertype){
// console.log(weathertype);
weatherManager.changeweather(weathertype);
}
//开启轨道镜头交互

View File

@ -487,32 +487,24 @@ THREE.StationManagerControls = function ( object, domElement ,regionManager,scen
function handleMouseDownRotate( event ) {
//console.log( 'handleMouseDownRotate' );
rotateStart.set( event.clientX, event.clientY );
}
function handleMouseDownDolly( event ) {
//console.log( 'handleMouseDownDolly' );
dollyStart.set( event.clientX, event.clientY );
}
function handleMouseDownPan( event ) {
//console.log( 'handleMouseDownPan' );
panStart.set( event.clientX, event.clientY );
}
function handleMouseMoveRotate( event ) {
//console.log( 'handleMouseMoveRotate' );
rotateEnd.set( event.clientX, event.clientY );
rotateDelta.subVectors( rotateEnd, rotateStart ).multiplyScalar( scope.rotateSpeed );
@ -534,8 +526,6 @@ THREE.StationManagerControls = function ( object, domElement ,regionManager,scen
function handleMouseMoveDolly( event ) {
//console.log( 'handleMouseMoveDolly' );
dollyEnd.set( event.clientX, event.clientY );
dollyDelta.subVectors( dollyEnd, dollyStart );
@ -558,8 +548,6 @@ THREE.StationManagerControls = function ( object, domElement ,regionManager,scen
function handleMouseMovePan( event ) {
//console.log( 'handleMouseMovePan' );
panEnd.set( event.clientX, event.clientY );
panDelta.subVectors( panEnd, panStart ).multiplyScalar( scope.panSpeed );
@ -574,14 +562,10 @@ THREE.StationManagerControls = function ( object, domElement ,regionManager,scen
function handleMouseUp( event ) {
// console.log( 'handleMouseUp' );
}
function handleMouseWheel( event ) {
// console.log( 'handleMouseWheel' );
if ( event.deltaY < 0 ) {
dollyOut( getZoomScale() );
@ -598,8 +582,6 @@ THREE.StationManagerControls = function ( object, domElement ,regionManager,scen
function handleKeyDown( event ) {
// console.log( 'handleKeyDown' );
var needsUpdate = false;
switch ( event.keyCode ) {
@ -640,16 +622,12 @@ THREE.StationManagerControls = function ( object, domElement ,regionManager,scen
function handleTouchStartRotate( event ) {
//console.log( 'handleTouchStartRotate' );
rotateStart.set( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY );
}
function handleTouchStartDollyPan( event ) {
//console.log( 'handleTouchStartDollyPan' );
if ( scope.enableZoom ) {
var dx = event.touches[ 0 ].pageX - event.touches[ 1 ].pageX;
@ -674,8 +652,6 @@ THREE.StationManagerControls = function ( object, domElement ,regionManager,scen
function handleTouchMoveRotate( event ) {
//console.log( 'handleTouchMoveRotate' );
rotateEnd.set( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY );
rotateDelta.subVectors( rotateEnd, rotateStart ).multiplyScalar( scope.rotateSpeed );
@ -694,8 +670,6 @@ THREE.StationManagerControls = function ( object, domElement ,regionManager,scen
function handleTouchMoveDollyPan( event ) {
//console.log( 'handleTouchMoveDollyPan' );
if ( scope.enableZoom ) {
var dx = event.touches[ 0 ].pageX - event.touches[ 1 ].pageX;
@ -734,8 +708,6 @@ THREE.StationManagerControls = function ( object, domElement ,regionManager,scen
function handleTouchEnd( event ) {
//console.log( 'handleTouchEnd' );
}
//
@ -764,7 +736,6 @@ THREE.StationManagerControls = function ( object, domElement ,regionManager,scen
//
// }
// jl3dStationManagerEquipSelect(intersects[0]);
// console.log(intersects);
// }

View File

@ -128,7 +128,6 @@ export function ModelManager(){
store.dispatch('app/animationsClose');
resolve("success"); //['成功了', 'success']
}).catch((error) => {
//console.log(error);
});
});
@ -142,8 +141,6 @@ function fbxpromise(asset,mixers,model){
if( mode == "2"){
loader.load( asset.url, function ( object ) {
model.mesh = object;
// console.log(asset.type);
// console.log(object);
resolve(asset.deviceType);
} );

View File

@ -24,7 +24,6 @@ export function PasserAi(finder,region) {
this.passerout = function(direct,mode,inNum){
if(direct == "top"){
// console.log("toppasser");
if(mode == "start"){
scope.toppasseron = true;
scope.toppasserin = true;
@ -155,8 +154,6 @@ export function PasserAi(finder,region) {
function shortStandRegion(startPos,endRegion,standType){
let shortDistancePos = "";
// console.log(standType);
// console.log(endRegion.belongList);
let index = Math.floor(Math.random() * (endRegion.belongList[standType].length-1));
return {
@ -219,7 +216,6 @@ export function PasserAi(finder,region) {
}
}
// console.log(humanlist.children);
if(scope.toppasserinNum >0){
for(let i=0;i<topWaitPassers.children.length;i++){
@ -277,12 +273,9 @@ export function PasserAi(finder,region) {
for(let i=0;i<humanlist.children.length;i++){
// console.log(humans[i]);
if(humanlist.children[i].overGoal == "top" || humanlist.children[i].overGoal == "down"){
if(humanlist.children[i].status == "0"){
// console.log(humanlist.children[0].status);
// console.log(humanlist.children[0].nowGoal);
if(humanlist.children[i].nowGoal == "ticketRegion"){
let points = [];
points.push(new THREE.Vector3(humanlist.children[i].position.x,humanlist.children[i].position.y,humanlist.children[i].position.z));

View File

@ -208,7 +208,6 @@ export function PassflowConnect(deviceaction,toptrain,downtrain,routegroup,passe
start = true;
toptrain.nowcode = null;
downtrain.nowcode = null;
console.log("仿真重开=====================");
}
@ -223,7 +222,6 @@ export function PassflowConnect(deviceaction,toptrain,downtrain,routegroup,passe
let actions;
function opentraindoor(train,doorcode,direct){
// console.log(train);
if(direct == "top"){
// if(doorcode == "1"){
// actions = train.action.down;

View File

@ -209,7 +209,6 @@ export function PassflowPassConnect(deviceaction,toptrain,downtrain,routegroup,p
// start = true;
// toptrain.nowcode = null;
// downtrain.nowcode = null;
// console.log("仿真重开=====================");
// }
//
//
@ -224,7 +223,6 @@ export function PassflowPassConnect(deviceaction,toptrain,downtrain,routegroup,p
let actions;
function opentraindoor(train,doorcode,direct){
// console.log(train);
if(direct == "top"){
// if(doorcode == "1"){
// actions = train.action.down;

View File

@ -29,14 +29,9 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe
// 仿真socket接口回调函数
function callback(Response) {
const data = JSON.parse(Response.body);
// console.log(data);
if(data.type == "PFV"){
// console.log(data);
// console.log(trafficTrain.trainList);
for(let k in trafficTrain.trainList){
if(trafficTrain.trainList[k].code == data.body){
// console.log( trafficTrain.trainList[k].code);
// console.log( data.body);
updateTrafficTrainValue(data.body);
trafficTrain.updateNowTrainCode(data.body);
trafficTrain.updateNowTrunk(0+'');
@ -49,11 +44,9 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe
if(data.type == "TrainRun_3D"){
trafficTrain.runList = data.body;
// console.log(data);
}
if(data.type == "BeAbout2Arrive_3D"){
// console.log(data);
if(toptrain.nowcode == data.body.groupNumber){
trafficTrain.arriveVoice(data.body.stationCode);
}
@ -61,7 +54,6 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe
}
// if(data.type == "TRAIN_PFI_BL"){
// // console.log(data);
// trafficTrain.updateTrainData(data.body);
//
// if(restart == true){
@ -69,12 +61,10 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe
// trafficTrain.restart();
// }
// // if(toptrain.nowcode == data.body.code){
// // console.log(data);
// // //根据上下车人数创建人
// // jl3d.updateNowLeaveData("top",data.body.out);
// // }
// // if(downtrain.nowcode == data.body.code){
// // console.log(data);
// // //根据上下车人数创建人
// // jl3d.updateNowLeaveData("down",data.body.out);
// // }

View File

@ -30,12 +30,8 @@ export function TrainPassConnect(trafficTrain,deviceaction,toptrain,routegroup,p
const data = JSON.parse(Response.body);
if(data.type == "PFV"){
// console.log(data);
// console.log(trafficTrain.trainList);
for(let k in trafficTrain.trainList){
if(trafficTrain.trainList[k].code == data.body){
// console.log( trafficTrain.trainList[k].code);
// console.log( data.body);
updateTrafficTrainValue(data.body);
trafficTrain.updateNowTrainCode(data.body);
trafficTrain.updateNowTrunk(0+'');
@ -48,7 +44,6 @@ export function TrainPassConnect(trafficTrain,deviceaction,toptrain,routegroup,p
if(data.type == "TRAIN_PFI_BL"){
// console.log(data);
trafficTrain.updateTrainData(data.body);
if(restart == true){
@ -56,12 +51,10 @@ export function TrainPassConnect(trafficTrain,deviceaction,toptrain,routegroup,p
trafficTrain.restart();
}
// if(toptrain.nowcode == data.body.code){
// console.log(data);
// //根据上下车人数创建人
// jl3d.updateNowLeaveData("top",data.body.out);
// }
// if(downtrain.nowcode == data.body.code){
// console.log(data);
// //根据上下车人数创建人
// jl3d.updateNowLeaveData("down",data.body.out);
// }

View File

@ -144,13 +144,9 @@ export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap,initCode) {
getPublish3dMapDetail(skinCode).then(netdata3d => {
passerStation.loadMaterial(netdata3d);
this.modelmanager.loadpromise(Staticmodel, scope.mixers,"2").then(function (data) {
// console.log(scope.modelmanager.station.mesh.getObjectByName("top"));
// let testtop = scope.modelmanager.station.mesh.getObjectByName("down");
// for(let i=0;i<testtop.children.length;i++){
// console.log(testtop.children[i].matrixWorld.elements[12]);
// console.log(testtop.children[i].matrixWorld.elements);
// }
// console.log(scope.modelmanager.station.mesh.getObjectByName("down"));
passerStation.initStationAnimation(scope.modelmanager.station.mesh,mixers,deviceaction,scene);
passerCheckDoor.initCheckDoorInAnimation(scope.modelmanager.zhajiin.mesh,mixers,deviceaction,scene);
passerCheckDoor.initCheckDoorOutAnimation(scope.modelmanager.zhajiout.mesh,mixers,deviceaction,scene);
@ -205,7 +201,6 @@ export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap,initCode) {
this.changestation = function(stationname){
passerStation.changestation(stationname);
// console.log(passerStation.nowStation);
scope.humanWaitTop = passerStation.nowStation.toppassers;
scope.humanWaitDown = passerStation.nowStation.downpassers;
passerHuman.speed = passerStation.nowStation.topspeed + passerStation.nowStation.downspeed;
@ -237,11 +232,9 @@ export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap,initCode) {
this.updateNowLeaveData = function(direct,outNum){
if(direct == "top"){
waitForCreatOutTop = getnum(outNum,17);
// console.log(waitForCreatOutTop);
for(let i=0;i<waitForCreatOutTop.length;i++){
for(let j=0;j<waitForCreatOutTop[i];j++){
setTimeout(function(){
// console.log(passerZone.list["standtop"].doorpoints[i]);
passerHuman.newHumanCreate(outStationPassers,passerZone.list["standtop"].doorpoints[i],5,"top",i);
}, Math.random()*1000*j);
}
@ -251,7 +244,6 @@ export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap,initCode) {
for(let i=0;i<waitForCreatOutDown.length;i++){
for(let j=0;j<waitForCreatOutDown[i];j++){
setTimeout(function(){
// console.log(passerZone.list["standdown"].doorpoints[i]);
passerHuman.newHumanCreate(outStationPassers,passerZone.list["standdown"].doorpoints[i],5,"down",i);
}, Math.random()*1000*j);
}
@ -341,7 +333,6 @@ export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap,initCode) {
let updateaianimate = setInterval(
function(){
// console.log("?");
if(aiswitch == 0){
updatePasserData(humanlist.children.length,topWaitPassers.children.length,downWaitPassers.children.length,outStationPassers.children.length,passerHuman.speed);
@ -381,7 +372,6 @@ export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap,initCode) {
passerWebWork.onmessage = function (event) {
if(aiswitch == 0){
// console.log(humanlist.children.length);
this.allStationData = [];
if(waitForCreatIn.length>0){
@ -412,7 +402,6 @@ export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap,initCode) {
// raycaster.setFromCamera( mouse, camerass );
//
// let intersects = raycaster.intersectObject(scope.modelmanager.station.mesh,true);
// console.log(intersects[0].point);
// }
// }

View File

@ -144,7 +144,6 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap,initCode) {
let passerTrain = new PasserTrain();
let pisControl = new PisTexture();
this.modelmanager.loadpromise(Staticmodel, scope.mixers,"2").then(function (data) {
// console.log(data);
passerTrain.initTrain(scope.modelmanager.train.mesh,mixers,deviceaction,scene);
passerTrain.toptrain.position.x = 0;
passerTrain.toptrain.position.y = 0;
@ -172,7 +171,6 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap,initCode) {
},1000);
let checkInitCode = setInterval(function(){
// console.log(scope.trainList[initCode]);
if(scope.trainList[initCode]){
pisControl.startRender();
@ -216,16 +214,13 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap,initCode) {
passerHuman.setNowTrunkPasser(humanlist,0,0);
let updateaianimate = setInterval(
function(){
// console.log("?");
if(aiswitch == 0){
passerHuman.moveAnimateUpdate(humanlist,passerHuman);
// passerAi.aiUpdate(humanlist,passerHuman,passerCheckDoor,deviceaction);
delta = clock.getDelta();
// console.log(mixers);
for(let i=mixers.length-1;i>=0;i--){
if(mixers[i]._actions[0].isRunning()){
// console.log(mixers[i]);
mixers[i].update( delta );
}
}
@ -326,7 +321,6 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap,initCode) {
let nowLeaveDoor = null;
this.updatePasserMove = function(doorData){
nowLeaveDoor = doorData.code;
// console.log(doorData);
}
@ -360,14 +354,12 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap,initCode) {
scope.updatePisTrain(scope.trainList[newCode]);
scope.nowTrainCode = newCode;
let trunkNum = 0;
// console.log(scope.trainList);
for(let k in scope.trainList){
if(scope.trainList[k].code == newCode){
let trainDataList = getnum(scope.trainList[k].num,6);
scope.nowTrunk.code = newCode;
scope.nowTrunk.numList = trainDataList;
// console.log(scope.trainList[i]);
for(let an=passerTrain.toptrain.action.top.length-1;an>=0;an--){
passerTrain.toptrain.action.top[an].reset();
passerTrain.toptrain.action.top[an].time = 0;

View File

@ -112,11 +112,9 @@ export function ModelManager(){
return new Promise(function(resolve, reject){
Promise.all(initlist).then((result) => {
console.log("success");
store.dispatch('app/animationsClose');
resolve("success"); //['成功了', 'success']
}).catch((error) => {
//console.log(error);
});
});

View File

@ -103,7 +103,6 @@ export function PasserHuman() {
// progress动画进度
// enable当前动画开关
// speed动画速度
// console.log(curve);
// model.action.play();
model.progress = 0;
@ -133,9 +132,6 @@ export function PasserHuman() {
}
}else{
//根据动画进度获取动画轨迹上点
// console.log(i);
// console.log(humanlist.children[i].runrail);
// console.log(humanlist.children[i].progress);
let point = outStationPassers.children[i].runrail.getPointAt(outStationPassers.children[i].progress);
//更新模型坐标
@ -168,9 +164,6 @@ export function PasserHuman() {
}
}else{
//根据动画进度获取动画轨迹上点
// console.log(i);
// console.log(humanlist.children[i].runrail);
// console.log(humanlist.children[i].progress);
let point = topWaitPassers.children[i].runrail.getPointAt(topWaitPassers.children[i].progress);
//更新模型坐标
@ -202,9 +195,6 @@ export function PasserHuman() {
}
}else{
//根据动画进度获取动画轨迹上点
// console.log(i);
// console.log(humanlist.children[i].runrail);
// console.log(humanlist.children[i].progress);
let point = downWaitPassers.children[i].runrail.getPointAt(downWaitPassers.children[i].progress);
//更新模型坐标
@ -253,7 +243,6 @@ export function PasserHuman() {
humanlist.children[i].stage = 2;
}else if(humanlist.children[i].stage == 0){
// // console.log(humans[i].doors);
// zhajiin[humanlist.children[i].doors].waiting = 0;
humanlist.children[i].stage = 1;
}
@ -262,9 +251,6 @@ export function PasserHuman() {
}else{
//根据动画进度获取动画轨迹上点
// console.log(i);
// console.log(humanlist.children[i].runrail);
// console.log(humanlist.children[i].progress);
let point = humanlist.children[i].runrail.getPointAt(humanlist.children[i].progress);
//更新模型坐标

View File

@ -87,7 +87,6 @@ export function PasserStation() {
} );
scope.stationMesh = object;
// console.log(deviceaction);
scene.add(object);
}
@ -170,7 +169,6 @@ export function PasserStation() {
}
this.initCodeStation = function(initCode){
for(let i=0,leni=scope.stationlist.length;i<leni;i++){
// console.log(scope.stationlist[i]);
if(scope.stationlist[i].downstand == initCode || scope.stationlist[i].topstand == initCode){
scope.nowStation = scope.stationlist[i];

View File

@ -55,7 +55,6 @@ export function PasserTrain() {
points2.push(new THREE.Vector3(-71,0.06,28.68));
points2.push(new THREE.Vector3(60.73,0.06,28.68));
scope.downtrain.curve = new THREE.CatmullRomCurve3(points2);
// console.log(scope.toptrain);
inittrainanimation(scope.toptrain,tclip,fclip,mixers);
inittrainanimation(scope.downtrain,tclip,fclip,mixers);
@ -74,7 +73,6 @@ export function PasserTrain() {
for(let j=0;j<train.children.length;j++){
// if(train.children[j].name == "c1" || train.children[j].name == "c6"){
// console.log(train.children[j].children);
for(let n=0,lenn = train.children[j].children.length;n<lenn;n++){
if(train.children[j].children[n].name == "top"){
train.children[j].children[n].animations = [];

View File

@ -35,7 +35,6 @@ export function PasserHuman() {
seatmesh.children[i].position.x = -seatmesh.children[i].position.x;
}
trunkManager.initTrunkSeat(seatmesh);
// console.log(waitGroup);
}
@ -104,7 +103,6 @@ export function PasserHuman() {
// progress动画进度
// enable当前动画开关
// speed动画速度
// console.log(curve);
model.actionDown.stop();
model.action.play();
model.progress = 0;
@ -128,9 +126,6 @@ export function PasserHuman() {
}else{
//根据动画进度获取动画轨迹上点
// console.log(i);
// console.log(humanlist.children[i].runrail);
// console.log(humanlist.children[i].progress);
let point = humanlist.children[i].runrail.getPointAt(humanlist.children[i].progress);
//更新模型坐标
@ -162,7 +157,6 @@ export function PasserHuman() {
}
this.initTrainRail = function(humanlist,inNum,leaveNum,direct){
// console.log(inNum[scope.nowTrunk]);
let inPasser = getnum(inNum[scope.nowTrunk].num,3);
let outPasser = getnum(leaveNum[scope.nowTrunk].num,3);
@ -264,11 +258,8 @@ export function PasserHuman() {
this.setNowTrunkPasser = function(humanlist,num,trunknum){
// let array = getnum(num,6);
// console.log(array);
// console.log(trunknum);
if(num){
// for(let i=0;i<array.length;i++){
// console.log(trunkManager.trunk[trunknum].seats);
for(let j=0;j<num;j++){
if(j<trunkManager.trunk[trunknum].seats.length){
@ -286,7 +277,6 @@ export function PasserHuman() {
waitGroup.children[0].position.z = newPos.pos[0].z-0.4;
waitGroup.children[0].rotation.y = Math.PI;
}
// console.log(waitGroup.children[0].actionDown);
// waitGroup.children[0].actionDown.play();
waitGroup.children[0].action.stop();
waitGroup.children[0].actionDown.reset();

View File

@ -224,10 +224,8 @@ export function ZoneManager() {
}
//获取区域范围内点
this.getinitposition = function(name){
// console.log(scope.list[name]);
let randompoint = new THREE.Vector3(0,scope.list[name].randompoint.y,0);
// console.log(randompoint);
if(name == "enter1"){
randompoint.x = scope.list[name].randompoint.x + Math.random()*8;
randompoint.z = scope.list[name].randompoint.z + Math.random()*8;

View File

@ -21,7 +21,6 @@ export function PasserAi(zone,finder) {
this.passerout = function(direct,mode,inNum){
if(direct == "top"){
// console.log("toppasser");
if(mode == "start"){
scope.toppasseron = true;
scope.toppasserin = true;
@ -56,7 +55,6 @@ export function PasserAi(zone,finder) {
scope.downpasseron = false;
scope.downpasserin = false;
}
// console.log("downpasser");
// scope.downpasseron = true;
// setTimeout(function(){
// scope.downpasseron = false;
@ -193,7 +191,6 @@ export function PasserAi(zone,finder) {
}
for(let i=0;i<humanlist.children.length;i++){
// console.log(humans[i]);
if(humanlist.children[i].status == 0){
//stage = 0 进入车站
@ -209,7 +206,6 @@ export function PasserAi(zone,finder) {
points.push(new THREE.Vector3(path[i].x,path[i].y,path[i].z));
}
passerHuman.initMoveAnimate(humanlist.children[i],i,points,i);
// console.log(path);
}
//stage = 1 前往进站闸机
@ -242,15 +238,12 @@ export function PasserAi(zone,finder) {
if(humanlist.children[i].stage == 3){
let direct = Math.floor(Math.random()*(2))+1;
// console.log(direct);
let points = [];
points.push(new THREE.Vector3(humanlist.children[i].position.x,humanlist.children[i].position.y,humanlist.children[i].position.z));
// points.push(new THREE.Vector3(11.81,9.8,13.11));
//1--top
//2-- down
// console.log(humanlist.children[i].overGoal);
// console.log(humanlist.children[i].direct);
if(humanlist.children[i].direct == "top"){
targetPosition = passerZone.getstandposition("standtop");
path = pathFinder.find(points[0],targetPosition.point);

View File

@ -31,10 +31,8 @@ export function dataManager(scene,camera,routegroup) {
this.init = function(skinCode){
modelmanager.loadpromise().then(function (data) {
// console.log(data);
return loadGeoJson();
}).then(function(data){
// console.log(data);
return loadMapData(skinCode);
}).then(function(data){
scope.nowConnect = new sandBoxConnect(scope,routegroup,section,signal,scope.station,scope.train);
@ -67,19 +65,13 @@ export function dataManager(scene,camera,routegroup) {
i = raycasterList.length;
}
}
// console.log(intersects);
if ( intersects.length > 0 ) {
intersect = intersects[ 0 ].object;
// console.log(intersect.object.position);
// // console.log(text.textplane.position);
// console.log(intersect.object.name);
// console.log(intersect.object.groupNumber);
let uiPos = {
x:event.clientX,
y:event.clientY,
};
console.log(intersect);
if(intersect.deviceType == "train"){
sandBoxUiUpdata("",uiPos,scope.train.trainDataList[intersect.groupNumber]);
}
@ -107,7 +99,6 @@ export function dataManager(scene,camera,routegroup) {
getPublishMapDetail(skinCode).then(netdata => {
console.log(netdata);
scope.station.init(stationData,netdata.data.psdList);
section.init(netdata.data.sectionList,netdata.data.switchList,stationData);
signal.init(netdata.data.signalList,section.topData,section.downData,scope.topCurve,scope.downCurve,modelmanager.signal);
@ -142,7 +133,6 @@ export function dataManager(scene,camera,routegroup) {
//['成功了', 'success']
readTextFile(JL3D_LOCAL_STATIC+"/trafficplan/fuzhou1.json", function(text){
var data = JSON.parse(text);
// console.log(data.data.busline_list[0]);
stationListData = data.data.busline_list[0];
let posx = stationListData.xs.split(",");
let posz = stationListData.ys.split(",");
@ -227,7 +217,6 @@ export function dataManager(scene,camera,routegroup) {
}
console.log(scope.station.stationGroup);
resolve("loadJson");
});

View File

@ -49,7 +49,6 @@ export function ModelManager(){
// store.dispatch('app/animationsClose');
resolve("success"); //['成功了', 'success']
}).catch((error) => {
//console.log(error);
});
});

View File

@ -34,9 +34,6 @@ export function sandBoxConnect(manager,routegroup,section,signal,station,train )
/** 站台客流当前人数信息 */
if(data.type == "STAND_PFI"){
console.log(data.body);
// console.log(data.body);
// console.log(station.stationDataList[stationCode]);
}
@ -125,11 +122,6 @@ export function sandBoxConnect(manager,routegroup,section,signal,station,train )
train.trainList[data.body[i].code].axis.crossVectors(train.trainList[data.body[i].code].up, tangent).normalize();
let radians = Math.acos(train.trainList[data.body[i].code].up.dot(tangent));
train.trainList[data.body[i].code].quaternion.setFromAxisAngle(train.trainList[data.body[i].code].axis, radians);
// console.log("/////");
// console.log("offset:"+data.body[i].offset);
// console.log("left:"+section.topSectionList[data.body[i].section].leftProgress);
// console.log("right:"+section.topSectionList[data.body[i].section].rightProgress);
// console.log("real:"+realprogress);
}
}else{

View File

@ -8,8 +8,6 @@ export function stationModel(scene) {
this.psdDataList = [];
this.init = function(stationData,psdData){
console.log(stationData);
console.log(psdData);
for(let i=0;i<stationData.length;i++){
scope.stationDataList[stationData[i].code] = {
name:stationData[i].name,

View File

@ -88,11 +88,8 @@ export function PisTexture(zone,finder) {
// stationList.push(mapnetdata.stationList[i]);
// }
// }
// // console.log(mapnetdata.stationList);
// for(let k in psdVoiceStationList){
// for(let i=0,leni=stationList.length;i<leni;i++){
// // console.log("---------------");
// // console.log("---------------");
// if(psdVoiceStationList[k].stationCode == stationList[i].code){
// psdVoiceStationList[k].nowStationName = stationList[i].name;
//

View File

@ -70,7 +70,6 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
scope.nowSceneType = lessonData.lessonProgress[0].progressScene;
animateManager.initAnimation(assetModelManager);
// console.log(lessonData.trainDeviceData);
controlManager.init(animateManager.actions,assetModelManager,lessonData.trainDeviceData);
startLesson();
@ -78,7 +77,6 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
loadingInstance.close();
resolve("loadeend"); //['成功了', 'success']
}).catch((error) => {
//console.log(error);
});
this.actionModelControl = function(actionType,actionModel){
@ -115,10 +113,7 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
lessonIndex = nowIndex;
// console.log(nowIndex);
scope.nowSceneType = lessonData.lessonProgress[nowIndex].progressScene;
// console.log(nowRole);
// console.log(lessonData.lessonProgress[lessonIndex].roleName);
if(lessonData.lessonProgress[lessonIndex].roleName == nowRole){
assetModelManager.changeSceneGroup(scope.nowSceneType);
accidentManager.changeSceneGroup(scope.nowSceneType);

View File

@ -181,7 +181,6 @@ export function AssetModelManager(editor,scene) {
updateTriggerList(scope.lessonTriggerList[editor.nowSceneType]);
resolve("loaderassets"); //['成功了', 'success']
}).catch((error) => {
//console.log(error);
});
});

View File

@ -185,18 +185,13 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
updatePlayer( deltaTime );
updateSpheres( deltaTime );
// console.log(scope.eventHitMode);
// console.log(roleMode);
if(scope.eventHitMode == true && roleMode){
if(eventBoxs.length>0){
attachBox.position.copy(fpsCamera.position);
for(let i=0;i<eventBoxs.length;i++){
hitBox.setFromObject(attachBox);
eventBoxs[i].setFromObject(eventBoxs[i].mesh);
// console.log(eventBoxs[i]);
if(hitBox.intersectsBox(eventBoxs[i])){
// console.log("相交");
// console.log(eventBoxs[i].action);
if(eventBoxs[i].action.actionMode == "remove"){
actionEvent("remove",eventBoxs[i].action,eventBoxs[i].mesh);
@ -207,7 +202,6 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
actionEvent("remove",eventBoxs[i].action,eventBoxs[i].mesh);
}
// console.log("slice");
eventBoxs.splice(i,1);
i--;
}
@ -221,11 +215,9 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
//
// if(hitBox.intersectsBox(eventTestBox)){
// //两个物体相交了
// console.log("相交");
// scope.eventHitMode = false;
// }
// else{
// console.log("不相交");
// }
}
@ -237,7 +229,6 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
this.init = function(actions,assetModelManager,trainDeviceData){
// worldOctree.fromGraphNode( standstationPZ );
actionList = actions;
// console.log(actionList);
modelManager = assetModelManager;
if(trainDeviceData){
trainDeviceMode = true;
@ -272,9 +263,6 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
document.addEventListener( 'mousedown', (event) => {
fpsMouseStatus = true;
// document.body.requestPointerLock();
// console.log("mousedown-----------------------");
// console.log(raycasterBoxs);
// console.log(roleMode);
if(raycasterBoxs.length>0 && roleMode){
var mouse = new THREE.Vector2();
@ -293,13 +281,10 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
if(intersects.length>0){
if(raycasterBoxs[i].type == "switch"){
// console.log(raycasterBoxs[i]);
// console.log(raycasterBoxs[i].actionMode);
if(raycasterBoxs[i].actionMode == "jump"){
actionEvent("remove",raycasterBoxs[i],raycasterBoxs[i].mesh);
jumpEvent("action",raycasterBoxs[i]);
}else if(raycasterBoxs[i].actionMode == "play"){
// console.log(raycasterBoxs[i]);
if(raycasterBoxs[i].action.actionType == "PBMDH"){
audiopbm.play();
}
@ -357,7 +342,6 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
if(raycasterBoxs.length>0){
let isOverEvent = false;
let overEvent = "";
// console.log(raycasterBoxs);
for(let i=0;i<raycasterBoxs.length;i++){
if(raycasterBoxs[i].actionStatus == "0"){
@ -568,7 +552,6 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
}
this.initControlMode = function(nowLessonIndex){
// console.log(lessonData.lessonProgress[nowLessonIndex].progressScene);
if(lessonData.lessonProgress[nowLessonIndex].progressScene == "standstation"){
worldOctree.fromGraphNode( standstationPZ );
@ -610,7 +593,6 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
attachBox.position.x = lessonData.lessonProgress[nowLessonIndex].cameraPosition.x;
attachBox.position.y = lessonData.lessonProgress[nowLessonIndex].cameraPosition.y ;
attachBox.position.z = lessonData.lessonProgress[nowLessonIndex].cameraPosition.z;
console.log(lessonData.lessonProgress[nowLessonIndex]);
fpsCamera.lookAt(lessonData.lessonProgress[nowLessonIndex].cameraTarget.x,lessonData.lessonProgress[nowLessonIndex].cameraTarget.y,lessonData.lessonProgress[nowLessonIndex].cameraTarget.z);
}
@ -636,11 +618,6 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
// eventBoxs = newEventBoxs;
raycasterBoxs = [];
roleMode = rMode;
// console.log("---------changeIndex--------");
// console.log(actions);
// console.log(roleMode);
// console.log(eventTrigger);
// console.log("----------------------------");
if(actions.length>0 ){
scope.eventHitMode = true;
@ -650,10 +627,6 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
if(actions[i].actionMode == "play"){
for(let j=0;j<eventTrigger.length;j++){
if(eventTrigger[j].label == actions[i].actionModel){
// console.log(eventTrigger[j].label);
// console.log(actions);
// console.log(actionList);
// console.log( actions[i]);
if(actionList[actions[i].actionModel]){
if(actionList[actions[i].actionModel].status == "01"){
actionList[actions[i].actionModel].status = "02";
@ -761,7 +734,6 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
}
}else if(actions.length>0){
// console.log(actions);
}
};

View File

@ -124,9 +124,6 @@ export function AssetModelManager(editor,scene) {
scope.lessonTriggerList["dc"] = [];
this.changeSceneGroup = function(groupType){
// console.log(groupType);
// console.log(editor.nowSceneType);
// console.log(scope.lessonTriggerList[editor.nowSceneType]);
editor.nowSceneType = groupType;
scene.remove(this.otherModel);
this.otherModel = groupList[groupType];
@ -178,7 +175,6 @@ export function AssetModelManager(editor,scene) {
}
console.log(modelList);
return modelList;
}
@ -242,7 +238,6 @@ export function AssetModelManager(editor,scene) {
resolve("loaderassets"); //['成功了', 'success']
}).catch((error) => {
//console.log(error);
});
});
@ -287,9 +282,6 @@ export function AssetModelManager(editor,scene) {
scope.staticAsset['station'].mesh.getObjectByName("spbmkg").label = "屏蔽门开关";
scope.lessonTriggerList["standstation"].push(scope.staticAsset['station'].mesh.getObjectByName("spbmkg"));
// console.log(scope.loadAsset['default1'].mesh.getObjectByName("FTKG"));
}
//动态加载资源
@ -319,12 +311,9 @@ export function AssetModelManager(editor,scene) {
resourceType:"三维课程",
sceneType:nowSceneType,
};
console.log("new");
fbxpromise(scope.loadAsset[assetData.id]).then(function(object){
console.log(scope.loadAsset[assetData.id].mesh);
let newModelTrigger = scope.loadAsset[assetData.id].mesh.clone(true);
newModelTrigger.showType = "loadModel";
newModelTrigger.modelId = assetData.id;
@ -346,8 +335,6 @@ export function AssetModelManager(editor,scene) {
function fbxpromise(asset){
return new Promise(function(resolve, reject){
var loader = new THREE.FBXLoader();
// console.log(asset);
// console.log(asset.url);
if(asset.assetType == "static"){
loader.load( asset.url, function ( object ) {
if(asset.sceneType){
@ -376,7 +363,6 @@ export function AssetModelManager(editor,scene) {
asset.mesh = object;
if(asset.assetType == "default"){
console.log(object);
// scene.add(object);
}else if(asset.assetType == 'loadModel'){

View File

@ -121,7 +121,6 @@ export function Lesson3dEditor(dom,lessonData) {
this.changeIndex = function(nowIndex){
lessonIndex = nowIndex;
console.log(lessonData.lessonProgress[lessonIndex]);
scope.nowSceneType = lessonData.lessonProgress[lessonIndex].progressScene;
assetModelManager.changeSceneGroup(scope.nowSceneType);
@ -138,9 +137,6 @@ export function Lesson3dEditor(dom,lessonData) {
}
this.editActionManager = function(type,value1,value2){
console.log(type);
console.log(value1);
console.log(value2);
if(type == "changeScene"){
assetModelManager.changeSceneGroup(value1);
accidentManager.changeSceneGroup(value1);

View File

@ -130,7 +130,6 @@ export function AccidentManager(scene) {
this.deleteAccident = function(selectAccident,nowSceneType){
groupList[nowSceneType].remove(selectAccident.object.points.obj);
console.log(selectAccident);
for(let i=0;i<scope.accidentList[nowSceneType].length;i++){
if(scope.accidentList[nowSceneType][i].id == selectAccident.id){
scope.accidentList[nowSceneType].splice(i,1);

View File

@ -125,9 +125,6 @@ export function AssetModelManager(editor,scene) {
this.changeSceneGroup = function(groupType){
// console.log(groupType);
// console.log(editor.nowSceneType);
// console.log(scope.lessonTriggerList[editor.nowSceneType]);
editor.nowSceneType = groupType;
scene.remove(this.otherModel);
this.otherModel = groupList[groupType];
@ -179,7 +176,6 @@ export function AssetModelManager(editor,scene) {
}
console.log(modelList);
return modelList;
}
@ -282,7 +278,6 @@ export function AssetModelManager(editor,scene) {
scope.staticAsset['station'].mesh.getObjectByName("spbmkg").label = "屏蔽门开关";
scope.lessonTriggerList["standstation"].push(scope.staticAsset['station'].mesh.getObjectByName("spbmkg"));
// console.log(DMH);
scope.staticAsset['station'].mesh.getObjectByName("DMH").showType = "default";
scope.staticAsset['station'].mesh.getObjectByName("DMH").label = "隔离门";
scope.lessonTriggerList["standstation"].push(scope.staticAsset['station'].mesh.getObjectByName("DMH"));
@ -297,7 +292,6 @@ export function AssetModelManager(editor,scene) {
}
}
// console.log(scope.loadAsset['default1'].mesh.getObjectByName("FTKG"));
}
//动态加载资源
@ -327,11 +321,9 @@ export function AssetModelManager(editor,scene) {
resourceType:"三维课程",
sceneType:nowSceneType,
};
console.log("new");
fbxpromise(scope.loadAsset[assetData.id]).then(function(object){
console.log(scope.loadAsset[assetData.id].mesh);
let newModelTrigger = scope.loadAsset[assetData.id].mesh.clone(true);
newModelTrigger.showType = "loadModel";
@ -354,8 +346,6 @@ export function AssetModelManager(editor,scene) {
function fbxpromise(asset){
return new Promise(function(resolve, reject){
var loader = new THREE.FBXLoader();
// console.log(asset);
// console.log(asset.url);
if(asset.assetType == "static"){
loader.load( asset.url, function ( object ) {
if(asset.sceneType){
@ -384,7 +374,6 @@ export function AssetModelManager(editor,scene) {
asset.mesh = object;
if(asset.assetType == "default"){
console.log(object);
// scene.add(object);
}else if(asset.assetType == 'loadModel'){

View File

@ -207,7 +207,6 @@ function FreeControls(camera, height) {
_scope._yawObject.translateX(translation.x);
_scope._yawObject.translateY(translation.y);
_scope._yawObject.translateZ(translation.z);
//console.log(_scope._yawObject.position);
}
if (!_scope.godView) {

View File

@ -458,7 +458,6 @@ THREE.OrbitControls = function ( object, domElement ) {
function handleMouseDownRotate( event ) {
//console.log( 'handleMouseDownRotate' );
rotateStart.set( event.clientX, event.clientY );
@ -466,7 +465,6 @@ THREE.OrbitControls = function ( object, domElement ) {
function handleMouseDownDolly( event ) {
//console.log( 'handleMouseDownDolly' );
dollyStart.set( event.clientX, event.clientY );
@ -474,7 +472,6 @@ THREE.OrbitControls = function ( object, domElement ) {
function handleMouseDownPan( event ) {
//console.log( 'handleMouseDownPan' );
panStart.set( event.clientX, event.clientY );
@ -482,8 +479,6 @@ THREE.OrbitControls = function ( object, domElement ) {
function handleMouseMoveRotate( event ) {
//console.log( 'handleMouseMoveRotate' );
rotateEnd.set( event.clientX, event.clientY );
rotateDelta.subVectors( rotateEnd, rotateStart ).multiplyScalar( scope.rotateSpeed );
@ -505,8 +500,6 @@ THREE.OrbitControls = function ( object, domElement ) {
function handleMouseMoveDolly( event ) {
//console.log( 'handleMouseMoveDolly' );
dollyEnd.set( event.clientX, event.clientY );
dollyDelta.subVectors( dollyEnd, dollyStart );
@ -529,8 +522,6 @@ THREE.OrbitControls = function ( object, domElement ) {
function handleMouseMovePan( event ) {
//console.log( 'handleMouseMovePan' );
panEnd.set( event.clientX, event.clientY );
panDelta.subVectors( panEnd, panStart ).multiplyScalar( scope.panSpeed );
@ -545,14 +536,10 @@ THREE.OrbitControls = function ( object, domElement ) {
function handleMouseUp( event ) {
// console.log( 'handleMouseUp' );
}
function handleMouseWheel( event ) {
// console.log( 'handleMouseWheel' );
if ( event.deltaY < 0 ) {
dollyOut( getZoomScale() );
@ -569,8 +556,6 @@ THREE.OrbitControls = function ( object, domElement ) {
function handleKeyDown( event ) {
// console.log( 'handleKeyDown' );
var needsUpdate = false;
switch ( event.keyCode ) {
@ -611,16 +596,12 @@ THREE.OrbitControls = function ( object, domElement ) {
function handleTouchStartRotate( event ) {
//console.log( 'handleTouchStartRotate' );
rotateStart.set( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY );
}
function handleTouchStartDollyPan( event ) {
//console.log( 'handleTouchStartDollyPan' );
if ( scope.enableZoom ) {
var dx = event.touches[ 0 ].pageX - event.touches[ 1 ].pageX;
@ -645,8 +626,6 @@ THREE.OrbitControls = function ( object, domElement ) {
function handleTouchMoveRotate( event ) {
//console.log( 'handleTouchMoveRotate' );
rotateEnd.set( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY );
rotateDelta.subVectors( rotateEnd, rotateStart ).multiplyScalar( scope.rotateSpeed );
@ -665,8 +644,6 @@ THREE.OrbitControls = function ( object, domElement ) {
function handleTouchMoveDollyPan( event ) {
//console.log( 'handleTouchMoveDollyPan' );
if ( scope.enableZoom ) {
var dx = event.touches[ 0 ].pageX - event.touches[ 1 ].pageX;
@ -705,8 +682,6 @@ THREE.OrbitControls = function ( object, domElement ) {
function handleTouchEnd( event ) {
//console.log( 'handleTouchEnd' );
}
//

View File

@ -431,32 +431,24 @@ THREE.OrbitControlsedit = function ( object, domElement ) {
function handleMouseDownRotate( event ) {
//console.log( 'handleMouseDownRotate' );
rotateStart.set( event.clientX, event.clientY );
}
function handleMouseDownDolly( event ) {
//console.log( 'handleMouseDownDolly' );
dollyStart.set( event.clientX, event.clientY );
}
function handleMouseDownPan( event ) {
//console.log( 'handleMouseDownPan' );
panStart.set( event.clientX, event.clientY );
}
function handleMouseMoveRotate( event ) {
//console.log( 'handleMouseMoveRotate' );
rotateEnd.set( event.clientX, event.clientY );
rotateDelta.subVectors( rotateEnd, rotateStart ).multiplyScalar( scope.rotateSpeed );
@ -475,8 +467,6 @@ THREE.OrbitControlsedit = function ( object, domElement ) {
function handleMouseMoveDolly( event ) {
//console.log( 'handleMouseMoveDolly' );
dollyEnd.set( event.clientX, event.clientY );
dollyDelta.subVectors( dollyEnd, dollyStart );
@ -499,8 +489,6 @@ THREE.OrbitControlsedit = function ( object, domElement ) {
function handleMouseMovePan( event ) {
//console.log( 'handleMouseMovePan' );
panEnd.set( event.clientX, event.clientY );
panDelta.subVectors( panEnd, panStart ).multiplyScalar( scope.panSpeed );
@ -515,14 +503,10 @@ THREE.OrbitControlsedit = function ( object, domElement ) {
function handleMouseUp( event ) {
// console.log( 'handleMouseUp' );
}
function handleMouseWheel( event ) {
// console.log( 'handleMouseWheel' );
if ( event.deltaY < 0 ) {
dollyOut( getZoomScale() );
@ -539,8 +523,6 @@ THREE.OrbitControlsedit = function ( object, domElement ) {
function handleKeyDown( event ) {
// console.log( 'handleKeyDown' );
var needsUpdate = false;
switch ( event.keyCode ) {
@ -581,16 +563,12 @@ THREE.OrbitControlsedit = function ( object, domElement ) {
function handleTouchStartRotate( event ) {
//console.log( 'handleTouchStartRotate' );
rotateStart.set( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY );
}
function handleTouchStartDollyPan( event ) {
//console.log( 'handleTouchStartDollyPan' );
if ( scope.enableZoom ) {
var dx = event.touches[ 0 ].pageX - event.touches[ 1 ].pageX;

View File

@ -406,32 +406,24 @@ THREE.OrbitControls = function ( object, domElement ) {
function handleMouseDownRotate( event ) {
//console.log( 'handleMouseDownRotate' );
rotateStart.set( event.clientX, event.clientY );
}
function handleMouseDownDolly( event ) {
//console.log( 'handleMouseDownDolly' );
dollyStart.set( event.clientX, event.clientY );
}
function handleMouseDownPan( event ) {
//console.log( 'handleMouseDownPan' );
panStart.set( event.clientX, event.clientY );
}
function handleMouseMoveRotate( event ) {
//console.log( 'handleMouseMoveRotate' );
rotateEnd.set( event.clientX, event.clientY );
rotateDelta.subVectors( rotateEnd, rotateStart );
@ -451,8 +443,6 @@ THREE.OrbitControls = function ( object, domElement ) {
function handleMouseMoveDolly( event ) {
//console.log( 'handleMouseMoveDolly' );
dollyEnd.set( event.clientX, event.clientY );
dollyDelta.subVectors( dollyEnd, dollyStart );
@ -475,8 +465,6 @@ THREE.OrbitControls = function ( object, domElement ) {
function handleMouseMovePan( event ) {
//console.log( 'handleMouseMovePan' );
panEnd.set( event.clientX, event.clientY );
panDelta.subVectors( panEnd, panStart );
@ -491,14 +479,10 @@ THREE.OrbitControls = function ( object, domElement ) {
function handleMouseUp( event ) {
// console.log( 'handleMouseUp' );
}
function handleMouseWheel( event ) {
// console.log( 'handleMouseWheel' );
if ( event.deltaY < 0 ) {
dollyOut( getZoomScale() );
@ -515,8 +499,6 @@ THREE.OrbitControls = function ( object, domElement ) {
function handleKeyDown( event ) {
//console.log( 'handleKeyDown' );
switch ( event.keyCode ) {
case scope.keys.UP:
@ -545,16 +527,12 @@ THREE.OrbitControls = function ( object, domElement ) {
function handleTouchStartRotate( event ) {
//console.log( 'handleTouchStartRotate' );
rotateStart.set( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY );
}
function handleTouchStartDolly( event ) {
//console.log( 'handleTouchStartDolly' );
var dx = event.touches[ 0 ].pageX - event.touches[ 1 ].pageX;
var dy = event.touches[ 0 ].pageY - event.touches[ 1 ].pageY;
@ -566,16 +544,12 @@ THREE.OrbitControls = function ( object, domElement ) {
function handleTouchStartPan( event ) {
//console.log( 'handleTouchStartPan' );
panStart.set( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY );
}
function handleTouchMoveRotate( event ) {
//console.log( 'handleTouchMoveRotate' );
rotateEnd.set( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY );
rotateDelta.subVectors( rotateEnd, rotateStart );
@ -595,8 +569,6 @@ THREE.OrbitControls = function ( object, domElement ) {
function handleTouchMoveDolly( event ) {
//console.log( 'handleTouchMoveDolly' );
var dx = event.touches[ 0 ].pageX - event.touches[ 1 ].pageX;
var dy = event.touches[ 0 ].pageY - event.touches[ 1 ].pageY;
@ -624,8 +596,6 @@ THREE.OrbitControls = function ( object, domElement ) {
function handleTouchMovePan( event ) {
//console.log( 'handleTouchMovePan' );
panEnd.set( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY );
panDelta.subVectors( panEnd, panStart );
@ -640,8 +610,6 @@ THREE.OrbitControls = function ( object, domElement ) {
function handleTouchEnd( event ) {
//console.log( 'handleTouchEnd' );
}
//

View File

@ -369,7 +369,6 @@ THREE.ScalControls = function ( scene,_camera, _domElement ) {
for(let i=0;i<_movemesh.railpoint.length;i++){
newpointlist.push(new THREE.Vector3(_movemesh.railpoint[i].x,_movemesh.railpoint[i].y,_movemesh.railpoint[i].z));
}
console.log(scalMode);
if(scalMode == "plane"){
if(_movemesh.railpoint.length>2){
@ -460,13 +459,11 @@ THREE.ScalControls = function ( scene,_camera, _domElement ) {
if(newpointlist.length>2){
_movemesh.lengthFact = _movemesh.lengthFact/curvestep;
}
console.log(_movemesh);
if(_movemesh.standTrack == true){
let newleftpoint = _movemesh.leftStopPointOffset/oldlengthfact;
let newrightpoint = _movemesh.rightStopPointOffset/oldlengthfact;
_movemesh.leftStopPointOffset = newleftpoint*_movemesh.lengthFact;
_movemesh.rightStopPointOffset = newrightpoint*_movemesh.lengthFact;
console.log(_movemesh.leftStopPointOffset);
}
@ -499,7 +496,6 @@ THREE.ScalControls = function ( scene,_camera, _domElement ) {
// _movemesh.geometry.center()
// _movemesh.position.set(oldobject.position.x,oldobject.position.y,oldobject.position.z);
// console.log(_movemesh.railpoint[2].x);
objectparent.add(_movemesh);
}
@ -565,7 +561,6 @@ THREE.ScalControls = function ( scene,_camera, _domElement ) {
if(_selected){
}else{
console.log("detach");
helpmove.position.y = 90000;
// _scene.remove(helpmove);
// objectparent = null;

View File

@ -150,7 +150,6 @@ THREE.TransformControls = function ( camera, domElement ) {
// Set current object
this.attach = function ( object,editmode ) {
console.log(editmode);
atobject = object;
if(editmode == "trackedit"){
if(atobject){
@ -385,7 +384,6 @@ THREE.TransformControls = function ( camera, domElement ) {
} else {
offset.applyQuaternion( parentQuaternionInv ).divide( parentScale );
}
console.log(sectionswitch);
if(sectionswitch){
let oldpositionx = object.position.x;
let oldpositionz = object.position.z;
@ -393,7 +391,6 @@ THREE.TransformControls = function ( camera, domElement ) {
atobject.position.x += object.position.x - oldpositionx;
atobject.position.z += object.position.z - oldpositionz;
console.log(object.position.x - oldpositionx);
atobject.railpoint[0] = {
x:cube1.matrixWorld.elements[12],
y:cube1.matrixWorld.elements[13],

View File

@ -296,7 +296,6 @@ export function AssetLoader() {
this.assetPromiseOver = function(scene) {
let initlist = [];
for (let i = 0; i < scope.modellist.length; i++) {
// console.log(scope.modellist);
initlist.push(fbxPromiseOver(scope.modellist[i]));
if (scope.modellist[i].packageName == "西安三隧道") {
scope.modellist.push(specilModelXiAn);
@ -311,7 +310,6 @@ export function AssetLoader() {
resolve("loaderassets"); //['成功了', 'success']
}).catch((error) => {
//console.log(error);
});
});
@ -331,7 +329,6 @@ export function AssetLoader() {
resolve("loaderassets"); //['成功了', 'success']
}).catch((error) => {
//console.log(error);
});
});
@ -366,18 +363,12 @@ export function AssetLoader() {
fbxpromise(signal)
.then(function(data) {
////console.log(data);
// console.log("test");
return fbxpromise(train);
})
.then(function(data) {
////console.log(data);
// console.log("test");
return fbxpromise(station);
})
.then(function(data) {
////console.log(data);
// console.log("test");
return fbxpromise(wstation);
})
// .then(function(data){

View File

@ -15,10 +15,6 @@ import { Loading } from 'element-ui';
// import {SwitchModel} from '@/jlmap3d/model/SwitchModel.js';
export function DriverLoadNew(data,scope,netdata,mapdata,sectionlist,signallist,switchlist,stationstandlist,trainlisttest,rails,camera,controls,scene,mixerss,project){
//console.log(mapdata);
//console.log(data);
//console.log(scope);
let sceneload = scene;
let backdata = scope;
let assetloader = scope.assetloader;
@ -33,15 +29,12 @@ export function DriverLoadNew(data,scope,netdata,mapdata,sectionlist,signallist,
let isNewdata = false;
if(netdata.assets){
let assetsdata = JSON.parse(netdata.sections);
// console.log(assetsdata.link);
if(assetsdata.link){
isSection = true;
}else{
isNewdata = true;
}
}
// console.log(isNewdata);
// console.log(netdata);
if(isNewdata == true){
initnew3d(data,netdata);
}else{
@ -100,9 +93,6 @@ export function DriverLoadNew(data,scope,netdata,mapdata,sectionlist,signallist,
return trainlisttest.drivertrain(mapdata.trainList,sceneload,assetloader,mixers,actions,"01");
})
.then(function(data){
//console.log(data);
//console.log(assetloader);
// console.log(stationstandlist);
return tdt.initTdt(stationstandlist.list,mapdata.sectionList,rails.sectionrail,sceneload);
})
.then(function(data){

View File

@ -93,8 +93,6 @@ THREE.FBXLoader = ( function () {
}
// console.log( fbxTree );
var textureLoader = new THREE.TextureLoader( this.manager ).setPath( this.resourcePath || path ).setCrossOrigin( this.crossOrigin );
return new FBXTreeParser( textureLoader, this.manager ).parse( fbxTree );

View File

@ -15,9 +15,6 @@ import store from '@/store/index';
// import {SwitchModel} from '@/jlmap3d/model/SwitchModel.js';
export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,scene,project){
//console.log(mapdata);
//console.log(data);
let sceneload = scene;
let backdata = scope;
let jlmap3ddata = mapdata;
@ -43,9 +40,6 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
}
function initnew3d(data,netdata){
// console.log(JSON.parse());
// console.log(netdata);
// console.log(JSON.parse(netdata.assets));
Materialload(scope,JSON.parse(netdata.assets).stationTextureList[0]);
let mapdata = data;
//初始化轨道和道岔
@ -84,31 +78,23 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
// assetloader.assetpromise(sceneload)
assetloader.assetPromiseOver(sceneload)
.then(function(data){
//console.log(data);
//,netdata.stands,mixers,actions,"0"
return stationstandlist.loadpromise(mapdata.stationList,standsdata,psddata,sceneload,assetloader,mixers,actions,"02",JSON.parse(netdata.assets).others,project);
})
.then(function(data){
//console.log(data);
return sectionlist.loadpromise(mapdata.sectionList,sectiondata.section,rails,scene,assetloader);
})
.then(function(data){
//console.log(data);
return signallist.loadpromise(mapdata.signalList,signaldata,sceneload,assetloader);
})
.then(function(data){
return switchlist.loadpromise(mapdata.switchList,switchdata,sceneload,assetloader,mixers,actions);
})
.then(function(data){
//console.log(data);
//console.log(assetloader);
return trainlisttest.initpromise(mapdata.trainList,sceneload,assetloader,mixers,actions,"02");
})
.then(function(data){
//console.log(data);
//console.log(assetloader);
// console.log(stationstandlist);
return tdt.initTdt(stationstandlist.list,mapdata.sectionList,rails.sectionrail,sceneload);
})
.then(function(data){
@ -138,7 +124,6 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
}
// console.log(stationstandlist.group.children[mm].getObjectByName("menkuangyanse"));
if(stationstandlist.group.children[mm].getObjectByName("menkuangyanse")){
stationstandlist.group.children[mm].getObjectByName("menkuangyanse").material.map =scope.stationtexture["pingbimen"];
stationstandlist.group.children[mm].getObjectByName("menkuangyanse").material.map.needsUpdate = true;
@ -187,7 +172,6 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
if ( xhr.lengthComputable ) {
let percentComplete = xhr.loaded / xhr.total * 100;
//console.log( 'model ' + Math.round( percentComplete, 2 ) + '% downloaded' );
}
@ -200,7 +184,6 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
function lengthfact(data){
let linklist = [];
//console.log(data);
for(let i=0;i<data.linkList.length;i++){
let dx = Math.abs(data.linkList[i].lp.x - data.linkList[i].rp.x);
@ -231,5 +214,4 @@ function lengthfact(data){
}
}
//console.log(sectionlist);
}

View File

@ -12,8 +12,6 @@ export function RailListN(){
};
// this.init = function(section,linklist,scene){
this.init = function(section,sectionList,switchdata,scene){
// console.log(section);
// console.log(switchdata);
for(let i=0;i<section.length;i++){
scope.sectionrail[section[i].code] = {
lp:section[i].lp,
@ -176,7 +174,6 @@ export function RailListN(){
// circle2.rotation.x = -Math.PI/2;
// scene.add( circle1 );
// scene.add( circle2 );
// console.log(scope.sectionrail[section[i].code]);
}else{
scope.sectionrail[section[i].code].standTrack = false;
}
@ -186,8 +183,6 @@ export function RailListN(){
// var geometry = new THREE.CircleGeometry( 0.05, 16 );
// var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
// var circle = new THREE.Mesh( geometry, material );
// // console.log(n);
// // console.log(scope.sectionrail[section[i].code].lineleft.points[n]);
// circle.position.x = scope.sectionrail[section[i].code].lineleft.points[n].x;
// circle.position.y = scope.sectionrail[section[i].code].lineleft.points[n].y;
// circle.position.z = scope.sectionrail[section[i].code].lineleft.points[n].z;
@ -245,8 +240,6 @@ export function RailListN(){
// var geometry = new THREE.CircleGeometry( 0.05, 16 );
// var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
// var circle = new THREE.Mesh( geometry, material );
// // console.log(n);
// // console.log(scope.sectionrail[section[i].code].lineleft.points[n]);
// circle.position.x = scope.sectionrail[sectioncode].lineleft.points[n].x;
// circle.position.y = scope.sectionrail[sectioncode].lineleft.points[n].y;
// circle.position.z = scope.sectionrail[sectioncode].lineleft.points[n].z;

View File

@ -49,7 +49,6 @@ this.loadpromise = function(sectionList,sectiondata,rails,scene,assetloader){
// autorail.leftlist = leftlist;
scene.add(scope.sectiongroup);
return new Promise(function(resolve, reject){
// console.log(sectiondata);
let mergegeometry = new THREE.Geometry();
for(let i=0,leni = sectiondata.length;i<leni;i++){
@ -101,7 +100,6 @@ this.loadpromise = function(sectionList,sectiondata,rails,scene,assetloader){
// testmesh2 = null;
if(newsection.railpoint.length>=3){
// console.log(newsection);
let height = Math.random()/1000;
var closedSpline;

View File

@ -18,7 +18,6 @@ export function SignalListN() {
for(let j=0,lenj = data.length;j<lenj;j++){
if(data[j].code == signaldata[i].code){
if(data[j].virtual == false){
// console.log(signaldata[i]);
let newsignal = new SignalModel(signaldata[i]);
let selectmesh = null;
for(let j=0;j<assetloader.modellist.length;j++){
@ -26,7 +25,6 @@ export function SignalListN() {
selectmesh = assetloader.modellist[j].mesh;
}
}
// console.log(signaldata[i]);
let newmesh = selectmesh.clone(true);
for(let j=0;j<newmesh.children.length;j++){

View File

@ -144,7 +144,6 @@ export function StationStandListN() {
}
this.loadpromise = function(stationdata, standsdata, psddata, scene, assetloader, mixers, actionss, mode, otherStation, project) {
return new Promise(function(resolve, reject) {
// console.log(standsdata);
let stations = stationdata;
let selectmesh1;
let selectmesh2;
@ -154,7 +153,6 @@ export function StationStandListN() {
let nologonc, nologowc, nologohc;
for (let j = 0; j < assetloader.modellist.length; j++) {
// console.log(assetloader.modellist[j].type);
if (assetloader.modellist[j].type == "stationInside") {
selectmesh1 = assetloader.modellist[j].mesh;
}
@ -238,7 +236,6 @@ export function StationStandListN() {
}
//
//
// console.log(psddata);
for (let i = 0; i < standsdata.length; i++) {
@ -340,8 +337,6 @@ export function StationStandListN() {
newstationmesh.code = standsdata[i].code;
newstationmesh.name = standsdata[i].code;
// console.log(newstationmesh.name);
// console.log(standsdata[i].inside);
newstationmesh.inside = standsdata[i].inside;
newstationmesh.position.x = standsdata[i].position.x;
newstationmesh.position.y = standsdata[i].position.y;

View File

@ -17,7 +17,6 @@ export function SwitchListN() {
return new Promise(function(resolve, reject){
scene.add( scope.switchgroup );
// let sectiondata = jlmap3ddata.sectionlist.sections.datalist;
// console.log(sectiondata);
let num;
for(let j=0;j<assetloader.modellist.length;j++){
if(assetloader.modellist[j].type == "switch"){
@ -25,7 +24,6 @@ export function SwitchListN() {
}
};
for(let i=0,leni = switchdata.length;i<leni;i++){
// console.log(switchdata[i]);
let newswitch = {
code:switchdata[i].code,
name:switchdata[i].name,
@ -59,7 +57,6 @@ export function SwitchListN() {
actions[autoswitch.code].action.clampWhenFinished = true;
mixers.push(mixer);
}
// console.log(scope.switchs.modellist);
resolve("loadedswitch");
});

View File

@ -17,7 +17,6 @@ export function TdtList() {
stopSections[sectionData[i].code] = sectionData[i];
}
}
// console.log(stationData);
for(let k in stationData){
for(let i=0;i<stationData[k].stands.length;i++){
let newmesh = object.clone(true);
@ -90,7 +89,6 @@ export function TdtList() {
ctx.textAlign = 'center';
ctx.textBaseline = 'middle';
ctx.clearRect(0,0,128,64);
//console.log(text.groupNumber);
ctx.drawImage(beauty,0,0,128, 64);
ctx.fillText(text, 64,32);
return canvas;

View File

@ -60,8 +60,6 @@ export function TrainListN() {
}
this.removeDriveTrain = function(removeLength){
console.log(removeLength);
scope.group.remove(scope.otherTrainmodels[0]);
scope.otherTrainmodels.splice(0,removeLength);
}
@ -69,7 +67,6 @@ export function TrainListN() {
this.drivertrain = function(data,scene,assetloader,mixers,actionss,mode){
return new Promise(function(resolve, reject){
// console.log(data);
let selectmesh,ntracks1,ntracks2,tclip,fclip;
for(let n=assetloader.modellist.length-1;n>=0;n--){
@ -105,15 +102,12 @@ export function TrainListN() {
newmesh.mixer = [];
for(let j=0;j<newmesh.children.length;j++){
// console.log("===================");
for(let n=0,lenn = newmesh.children[j].children.length;n<lenn;n++){
if(newmesh.children[j].children[n].name == "top"){
newmesh.children[j].children[n].animations = [];
newmesh.children[j].children[n].animations.push(tclip.clone());
let mixer = new THREE.AnimationMixer( newmesh.children[j].children[n] );
// console.log(n);
// console.log(newmesh.children[j].children[n]);
newmesh.mixer.push(mixer);
newmesh.mixerpush = false;
@ -151,7 +145,6 @@ export function TrainListN() {
// pos.position.x = -73.5;
// newmesh.children[j].add( pos );
newmesh.children[j].rotalist = [];
// console.log(newmesh);
}
newmesh.first = false;
@ -214,7 +207,6 @@ export function TrainListN() {
} );
//遍历列车数据
// console.log(data.length);
for(let i=0;i<data.length;i++){
@ -224,19 +216,14 @@ export function TrainListN() {
};
let newmesh = selectmesh.clone(true);
newmesh.mixer = [];
// console.log("-------------------------");
// console.log(data[i]);
for(let j=0;j<newmesh.children.length;j++){
// console.log("===================");
for(let n=0,lenn = newmesh.children[j].children.length;n<lenn;n++){
if(newmesh.children[j].children[n].name == "top"){
newmesh.children[j].children[n].animations = [];
newmesh.children[j].children[n].animations.push(tclip.clone());
let mixer = new THREE.AnimationMixer( newmesh.children[j].children[n] );
// console.log(n);
// console.log(newmesh.children[j].children[n]);
newmesh.mixer.push(mixer);
newmesh.mixerpush = false;
// mixers.push(mixer);
@ -274,7 +261,6 @@ export function TrainListN() {
// pos.position.x = -73.5;
// newmesh.children[j].add( pos );
newmesh.children[j].rotalist = [];
// console.log(newmesh);
}
//
@ -343,7 +329,6 @@ export function TrainListN() {
scope.list[data[i].groupNumber] = newmesh;
//scene.add(newmesh);
}
// console.log(selectmesh);
// for(let i=0,leni=selectmesh.children.length;i<leni;i++){
// selectmesh.children[i].geometry.dispose();
// selectmesh.children[i].material.dispose();
@ -361,7 +346,6 @@ let onProgress = function ( xhr ) {
if ( xhr.lengthComputable ) {
let percentComplete = xhr.loaded / xhr.total * 100;
console.log( Math.round( percentComplete, 2 ) + '% downloaded' );
}
@ -389,7 +373,6 @@ function getTextCanvas(text){
ctx.textAlign = 'center';
ctx.textBaseline = 'middle';
ctx.clearRect(0,0,128,64);
//console.log(text.groupNumber);
ctx.drawImage(beauty,0,0,128, 64);
ctx.fillText("车组号:"+text.groupNumber, 40,10);
ctx.fillText("车组人员:XXX", 40,20);

View File

@ -13,14 +13,9 @@ export function UpdateTrain(camera,traindata){
let speed = null;
if(traindata.group.children[j].progress<1){
// console.log(trainmodel.rname);
// console.log(trainmodel.speeds);
// console.log(trainmodel.progress);
let movecurve = trainmodel.curve;
if(trainmodel.status == "03"){//向左
// console.log(traindata.group.children[j].rname);
// console.log(traindata.group.children[j]);
if(movecurve){
let point = movecurve.getPointAt(trainmodel.progress);
if(Math.abs( point.z -trainmodel.children[0].matrixWorld.elements[14]) >0.05){
@ -48,8 +43,6 @@ export function UpdateTrain(camera,traindata){
if(trainmodel.children[1].rotalist.length > 0 || trainmodel.children[2].rotalist.length > 0 || trainmodel.children[3].rotalist.length > 0 || trainmodel.children[4].rotalist.length > 0|| trainmodel.children[5].rotalist.length > 0){
for(let rs = 1;rs<6;rs++){
// console.log("train:"+rs);
// console.log(trainmodel.children[rs].rotalist.length);
if(trainmodel.children[rs].rotalist[0]){
@ -71,7 +64,6 @@ export function UpdateTrain(camera,traindata){
xh = trainmodel.children[rs].rotalist.length;
}
}
//console.log(trainmodel.children[rs].rotalist.length);
}
}
@ -142,7 +134,6 @@ export function UpdateTrain(camera,traindata){
xh = trainmodel.children[rs].rotalist.length;
}
}
//console.log(trainmodel.children[rs].rotalist.length);
}

View File

@ -13,9 +13,6 @@ export function UpdateTrain(camera,traindata){
let speed = null;
if(traindata.group.children[j].progress >=0&&traindata.group.children[j].progress<=1){
// console.log(trainmodel.rname);
// console.log(trainmodel.speeds);
// console.log(trainmodel.progress);
let movecurve = trainmodel.curve;
if(trainmodel.status == "03"){
if(movecurve.points.length>1){
@ -33,9 +30,6 @@ export function UpdateTrain(camera,traindata){
trainmodel.children[0].rotation.z = trainmodel.children[0].rotation.y;
trainmodel.children[0].rotation.y = 0;
// console.log(trainmodel.children[0].rotation.x);
// console.log(trainmodel.children[0].rotation.y);
// console.log(trainmodel.children[0].rotation.z);
let rotas = {
posr:point,
rota:trainmodel.children[0].rotation.z
@ -51,7 +45,6 @@ export function UpdateTrain(camera,traindata){
if(trainmodel.children[1].rotalist.length > 0 || trainmodel.children[2].rotalist.length > 0 || trainmodel.children[3].rotalist.length > 0 || trainmodel.children[4].rotalist.length > 0|| trainmodel.children[5].rotalist.length > 0){
for(let rs = 1;rs<6;rs++){
//console.log(rs);
if(trainmodel.children[rs].rotalist[0]){
let offsetz = parseFloat(trainmodel.children[rs].matrixWorld.elements[14]) - parseFloat(trainmodel.children[rs].rotalist[0].posr.z);
@ -73,7 +66,6 @@ export function UpdateTrain(camera,traindata){
xh = trainmodel.children[rs].rotalist.length;
}
}
//console.log(trainmodel.children[rs].rotalist.length);
}
}
}
@ -109,7 +101,6 @@ export function UpdateTrain(camera,traindata){
if(trainmodel.children[1].rotalist.length > 0 || trainmodel.children[2].rotalist.length > 0 || trainmodel.children[3].rotalist.length > 0 || trainmodel.children[4].rotalist.length > 0|| trainmodel.children[5].rotalist.length > 0){
for(let rs = 1;rs<6;rs++){
//console.log(rs);
if(trainmodel.children[rs].rotalist[0]){
let offsetz = parseFloat(trainmodel.children[rs].rotalist[0].posr.z) - parseFloat(trainmodel.children[rs].matrixWorld.elements[14]);
@ -132,13 +123,10 @@ export function UpdateTrain(camera,traindata){
xh = trainmodel.children[rs].rotalist.length;
}
}
//console.log(trainmodel.children[rs].rotalist.length);
}
}
// console.log(trainmodel.rotalist);
}
@ -154,9 +142,6 @@ export function UpdateTrain(camera,traindata){
}else if(trainmodel.status == '03'){
trainmodel.curve = trainmodel.nextcurve;
}
// console.log(trainmodel.name);
// console.log(trainmodel.progress);
// console.log(trainmodel.nextcurve);
// if(trainmodel.status == "02"){
// trainmodel.progress = 0;
// }else if(trainmodel.status == "03"){

View File

@ -59,7 +59,6 @@ export function Jl3dXzexam(dom) {
document.addEventListener( "mousedown", onselect, false );
function onselect(){
// console.log(scope.camera.position);
}
this.anime = null;
@ -142,7 +141,6 @@ export function Jl3dXzexam(dom) {
// if (scope.mixers[i]) {
// if( scope.mixers[i].staticType){
// // console.log(scope.mixers[i].time);
// if(scope.mixers[i]._actions[0].time<stopTime){
// scope.mixers[i].update(delta);
// }else{

View File

@ -130,7 +130,6 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
this.initRoleMode = function(rMode,role){
roleMode = rMode;
nowRole = role;
// console.log(roleMode);
};
this.initExam = function(newExamList,newExamData){
@ -183,18 +182,13 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
updatePlayer( deltaTime );
updateSpheres( deltaTime );
// console.log(scope.eventHitMode);
// console.log(roleMode);
if(scope.eventHitMode == true && roleMode){
if(eventBoxs.length>0){
attachBox.position.copy(fpsCamera.position);
for(let i=0;i<eventBoxs.length;i++){
hitBox.setFromObject(attachBox);
eventBoxs[i].setFromObject(eventBoxs[i].mesh);
// console.log(eventBoxs[i]);
if(hitBox.intersectsBox(eventBoxs[i])){
// console.log("相交");
// console.log(eventBoxs[i].action);
if(eventBoxs[i].action.actionMode == "remove"){
actionEvent("remove",eventBoxs[i].action,eventBoxs[i].mesh);
@ -205,7 +199,6 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
actionEvent("remove",eventBoxs[i].action,eventBoxs[i].mesh);
}
// console.log("slice");
eventBoxs.splice(i,1);
i--;
}
@ -219,11 +212,9 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
//
// if(hitBox.intersectsBox(eventTestBox)){
// //两个物体相交了
// console.log("相交");
// scope.eventHitMode = false;
// }
// else{
// console.log("不相交");
// }
}
@ -269,9 +260,6 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
document.addEventListener( 'mousedown', (event) => {
fpsMouseStatus = true;
// document.body.requestPointerLock();
console.log("mousedown-----------------------");
console.log(raycasterBoxs);
console.log(roleMode);
if(raycasterBoxs.length>0 && roleMode){
var mouse = new THREE.Vector2();
@ -303,7 +291,6 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
}
}else if(raycasterBoxs[i].type == "urgeSwitch"){
console.log(raycasterBoxs[i]);
if(raycasterBoxs[i].action.status == "02"){
raycasterBoxs[i].action.status = "01";
raycasterBoxs[i].action.action.stop();
@ -532,7 +519,6 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
}
this.initControlMode = function(nowLessonIndex){
// console.log(lessonData.lessonProgress[nowLessonIndex].progressScene);
if(lessonData.lessonProgress[nowLessonIndex].progressScene == "standstation"){
worldOctree.fromGraphNode( standstationPZ );
@ -591,20 +577,13 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
// eventBoxs = newEventBoxs;
raycasterBoxs = [];
roleMode = rMode;
// console.log("---------changeIndex--------");
// console.log(actions);
// console.log(roleMode);
// console.log(eventTrigger);
// console.log("----------------------------");
console.log(roleMode);
if(actions.length>0 ){
scope.eventHitMode = true;
for(let i=0;i<actions.length;i++){
if(actions[i].actionType == "auto"){
console.log(actions[i]);
if(actions[i].actionMode == "play"){
for(let j=0;j<eventTrigger.length;j++){
if(eventTrigger[j].label == actions[i].actionModel){
@ -700,7 +679,6 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
}
}else if(actions.length>0){
// console.log(actions);
}
};

View File

@ -76,8 +76,6 @@ export function ZzWw(dom,lessonData,lessonIndex) {
this.actionModelControl = function(actionType,actionModel){
// console.log(actionType);
// console.log(actionModel);
if(actionType == "remove"){
assetModelManager.otherModel.remove(actionModel);
}else if(actionType == "show"){
@ -107,10 +105,7 @@ export function ZzWw(dom,lessonData,lessonIndex) {
lessonIndex = nowIndex;
// console.log(nowIndex);
scope.nowSceneType = lessonData.lessonProgress[nowIndex].progressScene;
// console.log(nowRole);
// console.log(lessonData.lessonProgress[lessonIndex].roleName);
if(lessonData.lessonProgress[lessonIndex].roleName == nowRole){
assetModelManager.changeSceneGroup(scope.nowSceneType);
controlManager.initRoleMode(true,nowRole);
@ -128,8 +123,6 @@ export function ZzWw(dom,lessonData,lessonIndex) {
if(nowIndex == (lessonData.lessonProgress.length-1)){
console.log(nowIndex);
console.log(lessonData.lessonProgress.length);
lessonEnd();
}
}

View File

@ -73,7 +73,6 @@ class ESolidStand extends Group {
textBackgroundColor: style.tipBackgroundColor
}
});
console.log('站台人数: ', modelNum);
this.add(this.arrowText);
this.arrowText.hide();
this.on('mouseover', () => {

View File

@ -350,7 +350,6 @@ export default {
},
selectedChange() {
const model = this.$store.state.menuOperation.selected;
console.log(model, model._type, this.$store.state.menuOperation.buttonOperation, 'caise');
if (model && model._type) {
switch (this.$store.state.menuOperation.buttonOperation) {
case OperationEvent.Station.guideLock.button.operation : {
@ -373,7 +372,6 @@ export default {
this.$refs.password.doShow(operate);
}
}).catch((e) => {
console.log(e);
this.$refs.noticeInfo.doShow();
});

View File

@ -76,7 +76,6 @@ export default {
// const self = this;
// window.onclick = function (e) {
// if (document.getElementById('menuBar') && !self.$store.state.training.trainingStart) {
// console.log('-------------');
// self.doClose(false);
// }
// };

View File

@ -78,7 +78,6 @@ export default {
this.title = title;
this.operate = operate || {};
if (operate.operateNext) {
console.log(this.operation, operate.operation);
this.operation = operate.operateNext;
} else {
this.operation = operate.operation;

View File

@ -113,7 +113,6 @@ export default {
if (this.mapData && this.mapData.skinVO) {
const parser = parserFactory(ParserType.Graph.value);
this.mapDevice = parser.parser(this.mapData, this.mapData.skinVO.code, this.map.getShowConfig());
console.log('parsed mapDevice', this.mapDevice)
}
},
loadData() {

View File

@ -106,7 +106,7 @@ export default {
if (valid) {
this.doClose();
}
}).catch((error) => { this.doClose(); this.$refs.noticeInfo.doShow(); console.log(error); });
}).catch((error) => { this.doClose(); this.$refs.noticeInfo.doShow(); });
},
cancel() {
const operate = {

View File

@ -116,7 +116,6 @@ export default {
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
console.log(this.buttonOperation, '***********');
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && (!this.buttonOperation || this.$route.query.ctc)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {

View File

@ -192,7 +192,6 @@ export default {
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
console.log(DeviceMenu.Signal, val, this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal), this.buttonOperation);
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && (!this.buttonOperation || this.$route.query.ctc)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {

View File

@ -128,7 +128,6 @@ export default {
// if (elem && elem.hasOwnProperty('success')) {
// if (elem.success) {
// const operate = this.$store.state.training.operate;
// console.log(elem);
// elem.stationCodes.forEach(stationCode => {
// const station = this.$store.getters['map/getDeviceByCode'](elem.stationCodes);
// const newOperate = {

View File

@ -702,7 +702,6 @@ export default {
activeDepart.changeSectionCode = event;
document.getElementById('sendRunplan').classList.add('active');
}
// console.log(event, this.tableData[index].departRunPlan.sectionCode, row.departRunPlan.sectionCode, '------');
},
focusArriveRunPlan(event, row) {
this.activeArriveRunPlan[row.code] = {sectionCode:event, code:row.code};
@ -758,7 +757,6 @@ export default {
this.currentRow = row;
this.rpMenuPopShow = false;
}
console.log(this.currentRow);
} else {
this.currentRow = null;
// this.rpMenuPopShow = false;

View File

@ -317,7 +317,6 @@ export default {
const operate = {
operation: operation
};
console.log(operate, '=====');
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/setButtonOperation', operation); //

View File

@ -201,7 +201,6 @@ export default {
this.$store.dispatch('menuOperation/setButtonOperation', null);
}
}).catch(error=>{
console.log(error);
this.$refs.noticeInfo.doShow();
});
break;
@ -215,7 +214,6 @@ export default {
this.$store.dispatch('menuOperation/setButtonOperation', null);
}
}).catch(error=>{
console.log(error);
this.$refs.noticeInfo.doShow();
});
break;

View File

@ -363,7 +363,6 @@ export default {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionFailed') });
}
}).catch((error) => {
console.log(error, '=====');
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });

Some files were not shown because too many files have changed in this diff Show More