Merge remote-tracking branch 'origin/test' into thailand

# Conflicts:
#	src/jmapNew/theme/components/menus/dialog/cmdManage.vue
#	src/jmapNew/theme/datie_01/menus/menuButton.vue
#	src/jmapNew/theme/datie_01/menus/menuSection.vue
#	src/jmapNew/theme/datie_01/menus/menuSignal.vue
#	src/jmapNew/theme/datie_01/menus/menuStation.vue
#	src/jmapNew/theme/datie_01/menus/menuStationStand.vue
#	src/jmapNew/theme/datie_01/menus/menuSwitch.vue
#	src/jmapNew/theme/datie_01/menus/menuTrain.vue
#	src/jmapNew/theme/datie_01/menus/passiveDialog/alarm.vue
#	src/jmapNew/theme/datie_02/menus/ctcWorkMenu.vue
#	src/jmapNew/theme/datie_02/menus/menuPanel.vue
#	src/jmapNew/theme/datie_02/menus/menuSection.vue
#	src/jmapNew/theme/datie_jd1a/menus/dialog/defectiveShunting.vue
#	src/jmapNew/theme/datie_jd1a/menus/dialog/mapVisual.vue
#	src/jmapNew/theme/datie_jd1a/menus/menuButton.vue
#	src/jmapNew/theme/datie_jd1a/menus/menuButtonCtc.vue
#	src/jmapNew/theme/datie_jd1a/menus/menuSection.vue
#	src/jmapNew/theme/datie_jd1a/menus/menuSignal.vue
#	src/jmapNew/theme/datie_jd1a/menus/menuStation.vue
#	src/jmapNew/theme/datie_jd1a/menus/menuStationStand.vue
#	src/jmapNew/theme/datie_jd1a/menus/menuTrain.vue
#	src/jmapNew/theme/datie_jd1a/menus/passiveDialog/alarm.vue
#	src/jmapNew/theme/datie_jd1a/menus/runplanPane.vue
#	src/jmapNew/theme/datie_ksk/menus/dialog/defectiveShunting.vue
#	src/jmapNew/theme/datie_ksk/menus/dialog/mapVisual.vue
#	src/jmapNew/theme/datie_ksk/menus/menuButton.vue
#	src/jmapNew/theme/datie_ksk/menus/menuButtonCtc.vue
#	src/jmapNew/theme/datie_ksk/menus/menuSection.vue
#	src/jmapNew/theme/datie_ksk/menus/menuSignal.vue
#	src/jmapNew/theme/datie_ksk/menus/menuStation.vue
#	src/jmapNew/theme/datie_ksk/menus/menuStationStand.vue
#	src/jmapNew/theme/datie_ksk/menus/menuSwitch.vue
#	src/jmapNew/theme/datie_ksk/menus/menuTrain.vue
#	src/jmapNew/theme/datie_ksk/menus/passiveDialog/alarm.vue
#	src/jmapNew/theme/datie_ksk/menus/runplanPane.vue
#	src/jmapNew/theme/datie_tky/menus/menuSection.vue
#	src/jmapNew/theme/datie_tky/menus/menuSignal.vue
#	src/jmapNew/theme/datie_tky/menus/menuSwitch.vue
#	src/jmapNew/theme/datie_tky/menus/menuTrain.vue
#	src/views/info/personalInfo.vue
#	src/views/newMap/display/exam/examPanel.vue
#	src/views/newMap/display/memberManage/addMember.vue
#	src/views/newMap/display/memberManage/membersManage.vue
#	src/views/newMap/display/simulationMenu/simulationMenu.vue
#	src/views/newMap/display/terminals/terminalMenu.vue
#	src/views/newMap/display/trainingDesign/draftTrainingList.vue
#	src/views/newMap/display/trainingList/testResult.vue
#	src/views/newMap/display/trainingList/trainingMenu.vue
This commit is contained in:
fan 2023-05-24 15:06:06 +08:00
commit 334710bb94
623 changed files with 28720 additions and 11389 deletions

View File

@ -18,6 +18,7 @@
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml"
},
"dependencies": {
"@stomp/stompjs": "^5.4.4",
"axios": "^0.18.0",
"dayjs": "^1.11.5",
"echarts": "^4.7.0",
@ -46,6 +47,7 @@
"vuedraggable": "^2.24.3",
"vuex": "^3.1.0",
"wangeditor": "^4.6.17",
"ws": "^8.13.0",
"xlsx": "^0.14.2",
"zrender": "^4.0.4"
},

View File

@ -1,6 +1,6 @@
<template>
<div id="app">
<router-view />
<router-view v-if="loadingComponent" />
<deomon-list ref="deomonList" @enterQcode="qcodeEntry" />
<qcode ref="qcode" />
<div v-show="loading" class="AppAll">
@ -8,7 +8,7 @@
<img :src="loadingImg" style="width: 100%; height: 100%;">
</div>
<div
v-if="!$store.state.user.baseUrl"
v-if="!$store.state.user.baseUrl && needLoading"
v-loading="!$store.state.user.baseUrl"
element-loading-text="拼命加载中"
element-loading-background="rgba(0, 0, 0, 0)"
@ -22,8 +22,7 @@
<script>
import { getToken, getUserIdKey } from '@/utils/auth';
import { getSessionStorage } from '@/utils/auth';
import { loginInfo, ProjectIcon } from '@/scripts/ProjectConfig';
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
import LoadingImg from '@/assets/loading.gif';
import AppLoading from '@/assets/appLoading.png';
@ -31,6 +30,9 @@ import { openIndexedDB } from '@/utils/indexedDb';
import Favicon from '@/assets/icon/favicon.png';
import DeomonList from '@/views/demonstration/deomonList/index';
import Qcode from '@/layout/components/Qcode.vue';
import {removeToken} from './utils/auth';
import { getFrontProjectConfigByLogin} from '@/api/projectConfig';
import { handlerUrl } from '@/utils/baseUrl';
export default {
name: 'App',
@ -46,10 +48,16 @@ export default {
loadingImg: LoadingImg,
appLoading: AppLoading,
loading: false,
jlFavicon: Favicon,
project: '',
jlFavicon: Favicon
loadingComponent: false
};
},
computed: {
needLoading() {
return this.$route.path !== '/authorization';
}
},
watch: {
'$store.state.socket.beLogoutCount': async function(val) {
if (this.$store.state.socket.loggedOutMsg.token === getToken()) {
@ -57,8 +65,9 @@ export default {
this.$alert(this.$t('tip.logoutTips'), this.$t('tip.hint'), {
confirmButtonText: this.$t('tip.confirm'),
callback: action => {
removeToken();
this.$store.dispatch('exit').then(resp => {
this.$router.push({path: loginInfo[getSessionStorage('project')].loginPath});
this.$router.push({path: `/login?project=${this.$store.state.projectConfig.markKey}`});
});
}
});
@ -76,18 +85,20 @@ export default {
if (val.path == '/display/demon' && val.query.client == 'diagramEdit') { //
this.loading = false;
}
if (this.$route.query.project || this.$route.path === '/login' || this.$route.path === '/') {
setSessionStorage('project', this.$route.query.project || 'login');
}
this.project = getSessionStorage('project');
if (this.project !== this.$store.state.projectConfig.markKey) {
this.initFrontProjectConfig();
}
},
created() {
this.project = getSessionStorage('project');
const linkIcon = loginInfo[this.project] ? loginInfo[this.project].linkIcon : (ProjectIcon[this.project] || '');
if (this.project && linkIcon) {
document.querySelector("link[rel*='icon']").href = linkIcon;
'$store.state.projectConfig.markKey': function(val) {
if (val) { this.loadingComponent = true; }
}
},
mounted() {
this.prohibitSystemContextMenu();
window.addEventListener('beforeunload', async e => {
if (!this.$route.query.noPreLogout) {
await this.$store.dispatch('preLogout');
@ -110,6 +121,22 @@ export default {
this.$store.dispatch('subscribe_un', {});
},
methods: {
initFrontProjectConfig() {
getFrontProjectConfigByLogin(this.project).then(resp => {
const urlData = handlerUrl();
const { baseApiUrl, baseSite, ossUrl, loginProLogo, browserTitle} = resp.data.viewSetting;
this.$store.dispatch('setBaseUrl', baseApiUrl || urlData.BASE_API);
this.$store.dispatch('setBaseSite', baseSite || urlData.BASE_SITE);
this.$store.dispatch('setOssUrl', ossUrl || urlData.OSS_URL);
this.$store.dispatch('projectConfig/setMarkKey', resp.data.markKey);
this.$store.dispatch('projectConfig/setProjectCode', resp.data.project);
this.$store.dispatch('projectConfig/setViewSetting', resp.data.viewSetting);
document.title = browserTitle;
if (loginProLogo) {
document.querySelector("link[rel*='icon']").href = (ossUrl || urlData.OSS_URL) + '/logo/' + loginProLogo;
}
}).catch(e => this.$message.error('获取配置数据失败!'));
},
quickEntry() {
this.$refs.deomonList.doShow();
},

View File

@ -7,10 +7,6 @@ const BASE_UPLOAD_API = store.state.user.uploadUrl;
// export const BASE_ASSET_API = store.state.user.resourcesUrl;
export const BASE_ASSET_API = store.state.user.ossUrl;
// console.log(JL3D_LOCAL_STATIC);
// console.log(BASE_UPLOAD_API);
// console.log(BASE_ASSET_API);
export function getUploadModelUrl() {
return (BASE_UPLOAD_API+"/api/upload/MODEL?appId=00001&appSecret=joylink00001");
}

View File

@ -307,3 +307,25 @@ export function queryMapListByUser() {
method: 'get'
});
}
/** 根据mapId获取客户端信息数据 */
export function getClientDataById(mapId) {
return request({
url: `/api/map/${mapId}/mapClientMap`,
method: 'get'
});
}
/** 发布地图根据id生成实训 */
export function generateTrainingData(data) {
return request({
url: `/api/v2/training/rule/generate/mapId`,
method: 'post',
data: data
});
}
/** 根据mapId获取列车信息 */
export function getTrainListByMapId(mapId) {
return request({
url: `/api/map/${mapId}/trains`,
method: 'get'
});
}

View File

@ -101,7 +101,7 @@ export function getOrgList() {
return request({
url: '/api/orgProject/list',
method: 'get'
})
});
}
/**
@ -111,5 +111,15 @@ export function selectOrgnization(orgId) {
return request({
url: `/api/orgProject/signIn/${orgId}`,
method: 'put'
})
});
}
/**
* 获取用户已经加入的仿真
*/
export function getSimulationJoined() {
return request({
url: '/simulation/joined/by/me',
method: 'get'
});
}

View File

@ -269,12 +269,12 @@ export function generateExam(pcId) {
}
/** 删除用户试卷 */
export function deleteUserExam(param) {
return request({
url: `/api/v2/paper/user/${puId}`,
method: 'method'
});
}
// export function deleteUserExam(param) {
// return request({
// url: `/api/v2/paper/user/${puId}`,
// method: 'DELETE'
// });
// }
/**
* @param {Number} puId 用户试卷Id

View File

@ -91,13 +91,13 @@ export function getSimulationTimeChart(mapId) {
})
}
// 课程内实训数据统计
export function getLessonTimeChart(id) {
return request({
url: `/api/stats/lesson/${id}/stats`,
method: 'get',
})
}
// // 课程内实训数据统计
// export function getLessonTimeChart(id) {
// return request({
// url: `/api/stats/lesson/${id}/stats`,
// method: 'get',
// })
// }
// 课程列表
export function getLessonList() {

221
src/api/newChat.js Normal file
View File

@ -0,0 +1,221 @@
import request from '@/utils/request';
/**
* 获取群列表
* @param {String} groupId 房间号
* @returns
*/
export function getGroupList(groupId) {
return request({
url: `/api/simulation/${groupId}/conversation/group/list`,
method: 'get'
});
}
/**
* 创建群
* @param {String} groupId 房间号
* @param {String} data
* @param {String} data.name 群组名称
* @param {String} data.imageUrl 群组头像
* @param {Array} data.memberIds 角色id列表
* @returns
*/
export function createGroup(groupId, data) {
return request({
url: `/simulation/${groupId}/operate/Conversation_Group_Create`,
method: 'post',
data
});
}
/**
* 修改群组名称
* @param {String} groupId 房间号
* @param {Object} data
* @param {String} data.id 群组id
* @param {String} data.name 群组名称
* @returns
*/
export function updateGroupName(groupId, data) {
return request({
url: `/simulation/${groupId}/operate/Conversation_Group_Update_Name`,
method: 'post',
data
});
}
/**
* 修改群组群主
* @param {String} groupId 房间号
* @param {Object} data
* @param {Number} data.id 群组id
* @param {String} data.memberId 角色id
* @returns
*/
export function updateGroupLeader(groupId, data) {
return request({
url: `/simulation/${groupId}/operate/Conversation_Group_Update_Leader`,
method: 'post',
data
});
}
/**
* 邀请人员入群
* @param {String} groupId 房间号
* @param {Object} data
* @param {Number} data.id 群组id
* @param {Array} data.memberIds 角色id列表
* @returns
*/
export function inviteMemberToGroup(groupId, data) {
return request({
url: `/simulation/${groupId}/operate/Conversation_Group_Invite_Member`,
method: 'post',
data
});
}
/**
* 移除群内人员
* @param {String} groupId 房间号
* @param {Object} data
* @param {Number} data.id 群组id
* @param {Array} data.memberIds 角色id列表
* @returns
*/
export function removeMemberFromGroup(groupId, data) {
return request({
url: `/simulation/${groupId}/operate/Conversation_Group_Remove_Member`,
method: 'post',
data
});
}
/**
* 退出群组
* @param {String} groupId 房间号
* @param {Object} data
* @param {Number} data.id 群组id
* @returns
*/
export function exitGroup(groupId, data) {
return request({
url: `/simulation/${groupId}/operate/Conversation_Group_Exit`,
method: 'post',
data
});
}
/**
* 解散群组
* @param {String} groupId 房间号
* @param {Object} data
* @param {Number} data.id 群组id
* @returns
*/
export function dissolveGroup(groupId, data) {
return request({
url: `/simulation/${groupId}/operate/Conversation_Group_Dissolve`,
method: 'post',
data
});
}
/**
* 发送语音信息
* @param {String} groupId 房间号
* @param {Object} data
* @param {Number} data.id 群组id
* @param {String} data.audioPath 文件地址
* @param {String} data.content 语音内容
* @returns
*/
export function sendAudio(groupId, data) {
return request({
url: `/simulation/${groupId}/operate/Conversation_Group_Audio_Chat`,
method: 'post',
data
});
}
/**
* 发送文字信息
* @param {String} groupId 房间号
* @param {Object} data
* @param {Number} data.id 群组id
* @param {String} data.content 文字内容
* @returns
*/
export function sendText(groupId, data) {
return request({
url: `/simulation/${groupId}/operate/Conversation_Group_Text_Chat`,
method: 'post',
data
});
}
/**
* 发送BASE64信息
* @param {String} groupId 房间号
* @param {Object} data
* @param {Number} data.id 群组id
* @param {String} data.fileBase64Str 文件base64码
* @returns
*/
export function sendBase64(groupId, data) {
return request({
url: `/simulation/${groupId}/operate/Conversation_Group_Audio_Base64`,
method: 'post',
data
});
}
/**
* 设置群消息已读
* @param {String} groupId 房间号
* @param {Object} data
* @param {Number} data.id 群组id
* @returns
*/
export function setGroupReadMessage(groupId, data) {
return request({
url: `/simulation/${groupId}/operate/Conversation_Group_Read_Message`,
method: 'post',
data
});
}
/**
* 发送私聊文字信息
* @param {String} groupId 房间号
* @param {Object} data
* @param {Number} data.memberId 角色id
* @param {String} data.content 文字内容
* @returns
*/
export function sendPrivateText(groupId, data) {
return request({
url: `/simulation/${groupId}/operate/Conversation_Group_Private_Text_Chat`,
method: 'post',
data
});
}
/**
* 发送私聊BASE64信息
* @param {String} groupId 房间号
* @param {Object} data
* @param {Number} data.memberId 角色id
* @param {String} data.fileBase64Str 文件base64码
* @returns
*/
export function sendPrivateBase64(groupId, data) {
return request({
url: `/simulation/${groupId}/operate/Conversation_Group_Private_Audio_Base64`,
method: 'post',
data
});
}

10
src/api/record.js Normal file
View File

@ -0,0 +1,10 @@
import request from '@/utils/request';
/** 查询用户使用记录统计 */
export function queryUserSimulationRecord(params, userId) {
return request({
url: `/api/record/stats/list/criteria/${userId}`,
method: 'get',
params
});
}

View File

@ -47,39 +47,39 @@ export function examNotifyNew({ examId }) {
});
}
/** 获取用户实训列表*/
export function getSimulationList(data) {
return request({
url: `/api/stats/simulation`,
method: 'get',
params: data
});
}
// export function getSimulationList(data) {
// return request({
// url: `/api/stats/simulation`,
// method: 'get',
// params: data
// });
// }
/** 添加用户仿真数据*/
export function postSimulationStats(data) {
return request({
url: `/api/stats/simulation`,
method: 'post',
data: data
});
}
// /** 添加用户仿真数据*/
// export function postSimulationStats(data) {
// return request({
// url: `/api/stats/simulation`,
// method: 'post',
// data: data
// });
// }
/** 更新用户仿真数据*/
export function putSimulationStats(data) {
return request({
url: `/api/stats/${data.id}`,
method: 'put',
data: data
});
}
// /** 更新用户仿真数据*/
// export function putSimulationStats(data) {
// return request({
// url: `/api/stats/${data.id}`,
// method: 'put',
// data: data
// });
// }
/** 删除用户仿真数据*/
export function deleteSimulationStats(statsId) {
return request({
url: `/api/stats/${statsId}`,
method: 'delete'
});
}
// export function deleteSimulationStats(statsId) {
// return request({
// url: `/api/stats/${statsId}`,
// method: 'delete'
// });
// }
/** 录制脚本仿真(新版)*/
export function scriptRecordNotifyNew(scriptId) {

View File

@ -32,6 +32,14 @@ export function updateTraining(data) {
data
});
}
/** 更新实训标签 */
export function updateTrainingLabel(data) {
return request({
url: `/api/v2/training/published/update/label`,
method: 'put',
data
});
}
/** 查询步骤列表 */
export function getTrainingStepList(trainingId) {
return request({

View File

@ -193,3 +193,11 @@ export function queryTemplateMapFunPaged(params) {
params
});
}
/** 线路功能覆盖生成(主要用于客户端重新生成后线路功能里客户端重新匹配) */
export function generateMapFun(data) {
return request({
url: `/api/mapFunction/generate/mapIds`,
method: 'post',
data
});
}

BIN
src/assets/sim_id.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 709 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -332,7 +332,6 @@ export default {
methods: {
handleEdit(row, column, index) {
this.$set(row, 'isEdit', true);
// console.log(this.$refs);
// if (this.$refs.customerInput.length) {
// this.$refs.customerInput[index].$el.querySelector('input').focus();
// }

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

@ -48,7 +48,6 @@ export function Pathaction(){
document.onmousedown = function(event){
jlmap3dedit.selectswitch = false;
console.log(event.button);
//辅助线段
@ -60,7 +59,6 @@ export function Pathaction(){
lineswitch = null;
console.log(linenew);
if(linenew){
@ -74,7 +72,6 @@ export function Pathaction(){
point1 = mouserray(event,jlmap3dedit);
console.log("new");
if(point1){
linenew = addline(point1,1,jlmap3dedit.splineHelperObjects,jlmap3dedit.scene);
jlmap3dedit.mapdata.path.push(linenew);
@ -104,7 +101,6 @@ export function Pathaction(){
jlmap3dedit.mapdata.sectionlist.sections.datalist[i].rail.push(linenew.geometry.vertices[n]);
}
jlmap3dedit.mapdata.sectionlist.sections.datalist[i].railline = linenew;
console.log(jlmap3dedit.mapdata.sectionlist.sections.datalist[i].rail);
i = jlmap3dedit.mapdata.sectionlist.sections.modellist.length;
}
}
@ -177,7 +173,6 @@ export function Pathaction(){
document.onmousedown = function(event){
console.log(event.button);
//辅助线段
@ -189,7 +184,6 @@ export function Pathaction(){
lineswitch = null;
console.log(linenew);
if(linenew){
@ -233,8 +227,6 @@ export function Pathaction(){
for(let n=0;n<linenew.geometry.vertices.length;n++){
jlmap3dedit.mapdata.sectionlist.sections.datalist[i].rail.push(linenew.geometry.vertices[n]);
}
console.log(jlmap3dedit.mapdata.sectionlist.sections.datalist[i]);
console.log(jlmap3dedit.mapdata.sectionlist.sections.datalist[i].rail);
}
}
}
@ -289,7 +281,6 @@ export function Pathaction(){
}
//点击事件
this.raycaster = function(data){
console.log();
if(scope.on == true){
//定义光线
@ -300,13 +291,11 @@ export function Pathaction(){
mouse.y = -(event.clientY / window.innerHeight) * 2 + 1;
raycaster.setFromCamera( mouse, data.camera );
console.log(data.splineHelperObjects);
let intersects1;
intersects1 = raycaster.intersectObjects( data.splineHelperObjects);
if(intersects1[0]){
console.log(intersects1[0]);
return intersects1[0].object;
}
@ -329,9 +318,7 @@ export function Pathaction(){
mouse.y = -(mousep.clientY / window.innerHeight) * 2 + 1;
raycaster.setFromCamera( mouse, jlmap3dedit.camera );
console.log(jlmap3dedit.assetloader.modellist[3].mesh);
var intersects = raycaster.intersectObjects(jlmap3dedit.assetloader.modellist[3].mesh.children);
console.log(intersects);
if(intersects[0]){
resultpoint = intersects[0].point;
return resultpoint;

View File

@ -79,13 +79,9 @@ export function Sectionaction(){
raycaster.setFromCamera( mouse, data.camera );
let intersects1;
// console.log(modellist);
for(let i=0;i<modellist.length;i++){
intersects1 = raycaster.intersectObject(modellist[i],true);
// console.log(intersects1);
if(intersects1[0]){
// console.log(intersects1[0].object.code);
// console.log(modellist[i].code);
if(intersects1[0].object.code == modellist[i].code){
return modellist[i];
@ -97,20 +93,17 @@ export function Sectionaction(){
}
this.changemodel = function(jlmap3dedit,changedata){
console.log(changedata);
let scene = jlmap3dedit.scene;
let assetloader = jlmap3dedit.assetloader;
let isnewmodel = true;
//判断是否是未加载模型
for(let i=0;i<assetloader.modellist.length;i++){
console.log(assetloader.modellist[i].assetUrl);
if(changedata.assetUrl == assetloader.modellist[i].assetUrl){
isnewmodel = false;
i = assetloader.modellist.length;
}
}
console.log(isnewmodel);
jlmap3dedit.assetloader.loadnewsection(changedata,jlmap3dedit);
@ -118,25 +111,19 @@ export function Sectionaction(){
// 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

@ -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

@ -55,8 +55,6 @@ export function Trainaction(){
if(intersects1[0]){
if(intersects1[0].object.name == data.mapdata.trainlisttest.list[i].name){
//console.log(intersects1[0].object.name);
console.log(data.mapdata.trainlisttest.list[i]);
return data.mapdata.trainlisttest.list[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,26 +39,22 @@ export function jl3dEditorLoader(mapid,scope){
set3dMapData(params).then(data => {
if(data.code == "200"){
//console.log("创建三维数据成功");
// console.log(data);
initData(editmapid,data.data.id);
}
}).catch(error => {
console.log(error);
console.error(error);
});
}
}).catch(error => {
console.log(error);
console.error(error);
});
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

@ -29,7 +29,6 @@ import { jl3dEditorLoader } from '@/jlmap3d/edit/jl3dEditorLoader';
import { Actionmanage } from '@/jlmap3d/edit/actionmanage';
export function JLmap3dEdit(dom, data, mapid) {
console.log(data);
var scope = this;
@ -144,7 +143,6 @@ export function JLmap3dEdit(dom, data, mapid) {
};
this.eventon = function(){
//console.log("on");
//raycaster交互模型点击事件
document.getElementById("testdraw").addEventListener( "mousedown", onselect, false );
//窗口自适应
@ -154,7 +152,6 @@ export function JLmap3dEdit(dom, data, mapid) {
};
this.eventoff = function(){
//console.log("off");
//raycaster交互模型点击事件
document.getElementById("testdraw").removeEventListener( "mousedown", onselect, false );
//窗口自适应
@ -163,7 +160,6 @@ export function JLmap3dEdit(dom, data, mapid) {
this.exportsection = function(){
let exporter = new THREE.OBJExporter();
console.log(scope.mapdata);
// let exportmodels = scope.mapdata.stationstandlist.group;
let exportmodels = scope.mapdata.sectionlist.sectiongroup;
// let exportmodels = scope.mapdata.stationstandlist.group;
@ -184,7 +180,6 @@ export function JLmap3dEdit(dom, data, mapid) {
this.exportsection = function(){
let exporter = new THREE.OBJExporter();
console.log(scope.mapdata);
// let exportmodels = scope.mapdata.stationstandlist.group;
let exportSectionModel = scope.mapdata.sectionlist.sectiongroup;
objDownload("section",exporter.parse( exportSectionModel ));
@ -226,10 +221,6 @@ export function JLmap3dEdit(dom, data, mapid) {
}
this.actiommode = function(changedata){
console.log(changedata);
console.log(scope.editmode);
// console.log(scope.actionmode);
// console.log(changedata);
if(changedata == "trackreplace"){
scope.editmode = "trackedit";
scope.eventon();
@ -274,7 +265,6 @@ export function JLmap3dEdit(dom, data, mapid) {
// if(scope.editmode == "pathedit"){
//
// if(scope.actionmode == "drawrail"){
// //console.log("drawrail");
// scope.selectmodel = scope.action.pathaction.drawline(scope);
// }
//
@ -305,27 +295,14 @@ export function JLmap3dEdit(dom, data, mapid) {
for(let i=0,leni=scope.mapdata.stationstandlist.list.length;i<leni;i++){
if(changeStation.code == scope.mapdata.stationstandlist.list[i].code){
let changeData = scope.mapdata.stationstandlist.list[i];
console.log(changeData);
let topStandTrack = scope.mapdata.sectionlist.sections.datalist[changeData.stands[0].section];
let downStandTrack = scope.mapdata.sectionlist.sections.datalist[changeData.stands[changeData.stands.length-1].section];
console.log(scope.mapdata.sectionlist.sections);
console.log(topStandTrack.mesh.railpoint[0].x);
console.log(topStandTrack.mesh.railpoint[2].x);
console.log(downStandTrack.mesh.railpoint[0].x);
console.log(downStandTrack.mesh.railpoint[2].x);
let rightpos = topStandTrack.leftStopPercent*(topStandTrack.mesh.railpoint[2].x -topStandTrack.mesh.railpoint[0].x)+topStandTrack.mesh.railpoint[0].x;
let leftpos = downStandTrack.rightStopPercent*(downStandTrack.mesh.railpoint[2].x -downStandTrack.mesh.railpoint[0].x)+downStandTrack.mesh.railpoint[0].x;
let rightX = changeData.mesh.position.x-63.4 - rightpos;
let leftX = changeData.mesh.position.x+63.4 - leftpos;
console.log("----------------------------");
console.log(rightpos);
console.log(leftpos);
console.log("----------------------------");
console.log(rightX);
console.log(leftX);
topStandTrack.mesh.position.x = topStandTrack.mesh.position.z + rightX;
downStandTrack.mesh.position.x = downStandTrack.mesh.position.x + leftX;
//
@ -367,9 +344,6 @@ export function JLmap3dEdit(dom, data, mapid) {
plane2.rotation.y = Math.PI/2;
let leftpos = scope.mapdata.sectionlist.sections.datalist[k].leftStopPercent*(scope.mapdata.sectionlist.sections.datalist[k].railpoint[2].x -scope.mapdata.sectionlist.sections.datalist[k].railpoint[0].x)+scope.mapdata.sectionlist.sections.datalist[k].railpoint[0].x;
let rightpos = scope.mapdata.sectionlist.sections.datalist[k].rightStopPercent*(scope.mapdata.sectionlist.sections.datalist[k].railpoint[2].x -scope.mapdata.sectionlist.sections.datalist[k].railpoint[0].x)+scope.mapdata.sectionlist.sections.datalist[k].railpoint[0].x;
// console.log("==========");
// console.log(scope.mapdata.sectionlist.sections.datalist[k].leftStopPercent);
// console.log(scope.mapdata.sectionlist.sections.datalist[k].rightStopPercent);
plane1.position.set(leftpos,scope.mapdata.sectionlist.sections.datalist[k].railpoint[1].y,scope.mapdata.sectionlist.sections.datalist[k].railpoint[1].z);
plane2.position.set(rightpos,scope.mapdata.sectionlist.sections.datalist[k].railpoint[1].y,scope.mapdata.sectionlist.sections.datalist[k].railpoint[1].z);
stationStopGroup.add(plane1);
@ -393,8 +367,6 @@ export function JLmap3dEdit(dom, data, mapid) {
//自动匹配轨道信号灯道岔
this.autoss = function(){
console.log("autoss");
// console.log(scope.mapdata);
scope.mapdata.signallist.resetsignal(scope.mapdata);
scope.mapdata.switchlist.resetswitch(scope.mapdata);
//old
@ -494,8 +466,6 @@ export function JLmap3dEdit(dom, data, mapid) {
newpointlist.push(new THREE.Vector3(alignmentModel.railpoint[1].x,alignmentModel.railpoint[0].y,alignmentModel.railpoint[0].z+0.001));
newpointlist.push(new THREE.Vector3(alignmentModel.railpoint[2].x,alignmentModel.railpoint[0].y,alignmentModel.railpoint[0].z));
// console.log(oldobject);
let newSection = reCreatSection(newpointlist,oldobject);
newSection.meshtype = "section";
scope.mapdata.sectionlist.sections.datalist[alignmentCode].mesh = newSection;
@ -569,8 +539,6 @@ export function JLmap3dEdit(dom, data, mapid) {
//三维交互点击事件函数
function onselect(event) {
//console.log("select");
//console.log("select");
if(scope.selectswitch == true){
scope.transcontrol.detach();
@ -593,7 +561,6 @@ export function JLmap3dEdit(dom, data, mapid) {
}
if(scope.editmode == "stationedit"){
console.log("stat!!!!!!!!!!!!");
scope.selectmodel = scope.action.stationaction.raycaster(scope);
}
@ -607,11 +574,9 @@ export function JLmap3dEdit(dom, data, mapid) {
if(scope.editmode == "pathedit"){
scope.selectmodel = scope.action.pathaction.raycaster(scope);
//console.log(scope.selectmodel);
}
if(scope.selectmodel != null){
//console.log(scope.selectmodel.rotation);
if(scalControls.scalon){
}else{

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

@ -36,7 +36,6 @@ export function SectionList() {
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 SectionList() {
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;
@ -97,7 +95,6 @@ export function SectionList() {
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;
@ -106,7 +103,6 @@ export function SectionList() {
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
@ -175,7 +171,6 @@ export function SectionList() {
reals:[],
posx:null,
};
// console.log(stationlist[i]);
// realstopsection.stands.push();
for(let n=0,lenn = stationlist[i].stands.length;n<lenn;n++){
@ -384,7 +379,6 @@ export function SectionList() {
}
//根据站台区段创建站台位置 120停车点距离
for(let j=0,lenj=stations.length;j<lenj;j++){
// console.log(j);
let direction1 = scope.sections.datalist[stations[j].stands[0].section];
let direction2 = scope.sections.datalist[stations[j].stands[1].section];
@ -404,7 +398,6 @@ export function SectionList() {
}
// scope.sections.datalist[stations[0].stands[0].section].endbuild = true;
console.log("START BUILD !!!!!!!!!!!!!!!!!");
buildsectionall(scope.sections.datalist[stations[0].stands[0].section]);
resolve("loadersection");
});
@ -492,12 +485,7 @@ export function SectionList() {
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 ;
@ -666,11 +654,7 @@ export function SectionList() {
];
}
// 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" ){
@ -1015,16 +999,13 @@ export function SectionList() {
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 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

@ -83,18 +83,14 @@ export function StationStandList() {
}
}
console.log(scope.list);
resolve("loadedstation");
});
}
this.loadpromise = function(jlmap3ddata,standsdata,jlmapdata,scene,assetloader,otherStation){
return new Promise(function(resolve, reject){
// console.log(jlmap3ddata);
let jlmapstationdata = jlmapdata.stationList;
let jlmapstanddata = jlmapdata.stationStandList;
// jlmapstationdata.splice(0,1);
console.log(standsdata);
console.log(jlmapstationdata);
// for(let i=0;i<jlmapstationdata.length;i++){// || jlmapstationdata[i].subheadDisplay == false
// if(jlmapstationdata[i].visible == false){
// jlmapstationdata.splice(i,1);
@ -103,30 +99,19 @@ export function StationStandList() {
// standsdata[i].code = jlmapstationdata[i].code;
// standsdata[i].name = jlmapstationdata[i].name;
// }
// // console.log(jlmapstationdata[i].subheadDisplay);
// }
// console.log(jlmapstationdata);
console.log(standsdata);
//
// console.log(jlmapstationdata);
//
// console.log(standsdata);
// console.log(jlmapstationdata);
for(let i=0;i<jlmapstationdata.length;i++){
if(jlmapstationdata[i].visible == false || jlmapstationdata[i].depot == true){
jlmapstationdata.splice(i,1);
i--;
}else{
// console.log(jlmapstationdata[i]);
// console.log(standsdata[i]);
standsdata[i].code = jlmapstationdata[i].code;
standsdata[i].name = jlmapstationdata[i].name;
}
}
// console.log(otherStation);
// console.log(standsdata);
// console.log(assetloader.modellist);
let stations = jlmap3ddata.stationstandlist.list;
let num;
let num2;
@ -154,9 +139,6 @@ export function StationStandList() {
num3 = j;
}
}
// console.log("+++++++++++++");
// console.log(jlmapstanddata);
// console.log(standsdata);
for(let i=0;i<standsdata.length;i++){
let newstationstand = new StationStandModel(standsdata[i]);
let newstationmesh;
@ -186,7 +168,6 @@ export function StationStandList() {
newstationstand.name = standsdata[i].name;
newstationstand.inside = standsdata[i].inside;
// console.log(standsdata[i]);
newstationmesh.code = standsdata[i].code;
newstationmesh.name = standsdata[i].name;
newstationmesh.meshtype = "station";
@ -211,13 +192,11 @@ export function StationStandList() {
}else{
newstationmesh = assetloader.modellist[num2].mesh.clone(true);
}
// console.log(jlmapstanddata[j]);
newstationstand.code = standsdata[i].code;
newstationstand.name = standsdata[i].name;
newstationstand.inside = standsdata[i].inside;
// console.log(standsdata[i]);
newstationmesh.code = standsdata[i].code;
newstationmesh.name = standsdata[i].name;
newstationmesh.meshtype = "station";
@ -232,11 +211,9 @@ export function StationStandList() {
scope.list.push(newstationstand);
}else{
newstationmesh = assetloader.modellist[num3].mesh.clone(true);
// console.log(jlmapstanddata[j]);
newstationstand.code = standsdata[i].code;
newstationstand.name = standsdata[i].name;
newstationstand.inside = standsdata[i].inside;
// console.log(standsdata[i]);
newstationmesh.code = standsdata[i].code;
newstationmesh.name = standsdata[i].name;
newstationmesh.position.x = standsdata[i].position.x;

View File

@ -14,11 +14,9 @@ export function SwitchList() {
};
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 SwitchList() {
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 SwitchList() {
}
};
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 SwitchList() {
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 SwitchList() {
}
this.resetswitch = function(data){
// console.log("reset");
let sectiondata = data.sectionlist.sectiongroup;
for(let i=0;i<scope.switchs.datalist.length;i++){

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

@ -485,7 +485,6 @@ export function Moveanimate(main){
}
}else{
// console.log(scope.animatelist[k].connectmodel);
if(scope.nowmodelname != scope.playlist[scope.playorder][i].connectmodel.name){
scope.nowmodelname = scope.playlist[scope.playorder][i].connectmodel.name;
main.animationmsgshowon(scope.playlist[scope.playorder][i].connectmodel);

View File

@ -10,7 +10,6 @@ export function Textconfig(){
if(scope.devicelist.length>0){
scope.devicelist = [];
}
console.log(selectmodel.deviceType);
if(selectmodel.deviceType == "DeviceSwitch"){
initSwitchText(selectmodel);
}
@ -92,9 +91,6 @@ export function Textconfig(){
}
// if(part.text == null){
// console.log(selectmodel.children[i].name);
// }
if(part.text){
scope.devicelist.push(part);
}
@ -192,9 +188,6 @@ export function Textconfig(){
part.msg = "用于机内外电缆连接,方便更换转辙机。";
selectmodel.children[i].text = "二十位插接件";
}
// if(part.text == null){
// console.log(selectmodel.children[i].name);
// }
if(part.text){
scope.devicelist.push(part);
}

View File

@ -143,11 +143,8 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
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;
@ -294,7 +291,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{
@ -343,10 +339,6 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
scope.raycasterstatus = false;
scope.nowobject = null;
updatemenulist();
if(data._type == "Station"){
console.log(data);
}
if (data._type == "Switch") {
// scope.modelmanager.switchmodel.locateType = data.body.locateType;
@ -493,8 +485,6 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
this.changeAnimate = function(type){
//
console.log(type);
// console.log(scope.modelmanager.staticswitchmodel);
// scope.modelmanager.staticswitchmodel.action["2kai"].reset();
// scope.modelmanager.staticswitchmodel.action["5jiasuo"].reset();
@ -520,7 +510,6 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
stopTime = 3.33;
scope.modelmanager.staticswitchmodel.action.play();
console.log(scope.mixers);
}
if(type == "action2"){
scope.camera.position.x = -7.23;
@ -584,8 +573,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

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

View File

@ -156,7 +156,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";
@ -271,7 +270,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;
@ -313,7 +311,6 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
if(driverWebWorker){
driverWebWorker.terminate();
}
// console.log(scope);
// scope = null;
};
@ -386,7 +383,6 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
realsectionlist = loadrealsectionlist;
rails = loadrails;
console.log(trainlisttest);
trainlisttest.group.children[0].getObjectByName("C6").add(cameracctv);
}
@ -401,7 +397,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 );
// 窗口自适应
@ -420,7 +415,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;
@ -493,7 +487,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

@ -81,7 +81,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
}
if(data.type == "DeviceCtrl_3D"){
// console.log(data);
if (data.body.type== 'SIGNAL' && signallist) {
signalupdate(data.body);
return;
@ -201,8 +200,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
}
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;
@ -222,7 +219,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
this.socketon = function(topic) {
try {
// console.log("teststomp");
// scope.teststomp.subscribe(topic, callback, header);
} catch (error) {
console.error('websocket订阅失败');
@ -255,13 +251,11 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
// 仿真socket接口回调函数
function callback(Response) {
// console.log(Response);
// 对象化数据
let data = JSON.parse(Response.body);
// stats.update();
// 遍历后台数据
// console.log(data);
if(data.type == "Train_Position"){
nowTrainRun(data.body);
@ -306,7 +300,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
}
function DeviceDestroy(data){
// console.log(data);
for(let i=0,leni=data.length;i<leni;i++){
if(data[i].type == "SIGNAL"){
@ -359,10 +352,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
}
function otherTrainUpdate(data,updateTrainModel){
// console.log(data);
// if(data.code = "336"){
// console.log(data);
// }
if(rails.sectionrail[data.section]){
if(data.section != updateTrainModel.nowsection){
updateTrainModel.nowsection = data.section;
@ -418,7 +407,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
// if(updateTrainModel.children[1].rotalist.length > 0 || updateTrainModel.children[2].rotalist.length > 0 || updateTrainModel.children[3].rotalist.length > 0 || updateTrainModel.children[4].rotalist.length > 0|| updateTrainModel.children[5].rotalist.length > 0){
for(let rs = 1;rs<updateTrainModel.children.length;rs++){
//console.log(rs);
if(updateTrainModel.children[rs].rotalist[0]){
let offsetz = parseFloat(updateTrainModel.children[rs].rotalist[0].posr.z) + parseFloat(updateTrainModel.children[rs].position.z);
@ -441,13 +429,11 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
xh = updateTrainModel.children[rs].rotalist.length;
}
}
//console.log(trainmodel.children[rs].rotalist.length);
}
}
// console.log(trainmodel.rotalist);
// }
}else{
@ -493,7 +479,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
// if(updateTrainModel.children[1].rotalist.length > 0 || updateTrainModel.children[2].rotalist.length > 0 || updateTrainModel.children[3].rotalist.length > 0 || updateTrainModel.children[4].rotalist.length > 0|| updateTrainModel.children[5].rotalist.length > 0){
for(let rs = 1;rs<updateTrainModel.children.length;rs++){
//console.log(rs);
if(updateTrainModel.children[rs].rotalist[0]){
let offsetz = parseFloat(updateTrainModel.children[rs].rotalist[0].posr.z) - parseFloat(updateTrainModel.children[rs].matrixWorld.elements[14]);
@ -658,7 +643,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
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<trainmodel.children.length;rs++){
//console.log(rs);
if(trainmodel.children[rs].rotalist[0]){
let offsetz = parseFloat(trainmodel.children[rs].rotalist[0].posr.z) + parseFloat(trainmodel.children[rs].position.z);
@ -685,13 +669,10 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
xh = trainmodel.children[rs].rotalist.length;
}
}
//console.log(trainmodel.children[rs].rotalist.length);
}
}
// console.log(trainmodel.rotalist);
}
}else{
@ -768,7 +749,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
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<trainmodel.children.length;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]);
trainmodel.children[rs].position.z += offsetz;
@ -794,7 +774,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
xh = trainmodel.children[rs].rotalist.length;
}
}
//console.log(trainmodel.children[rs].rotalist.length);
}
}
}
@ -817,10 +796,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
function traindoorupdate(data){
// console.log(data);
// console.log("direct:"+trainmodel.right);
// console.log(trainmodel.openleft);
// console.log(trainmodel.openright);
if(trainmodel.code == data.trainCode){
if(trainmodel.right == "0"){
if(data.code == "2"){

View File

@ -4,11 +4,9 @@ export function UpdateTrain(camera,traindata,control){
if(traindata != undefined && traindata.group.children[0]){//traindata.group.children[0].dispose == false
if(traindata.group.children[0].progress != null){
// console.log(traindata.group);
let trainmodel = traindata.group.children[0];
if(trainmodel.speeds > 0 && trainmodel.speeds){
let speed = null;
// console.log(traindata.group.children[0].progress);
if(traindata.group.children[0].progress >=0&&traindata.group.children[0].progress<=1){
let movecurve = trainmodel.curve;
@ -44,7 +42,6 @@ export function UpdateTrain(camera,traindata,control){
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);
@ -66,7 +63,6 @@ export function UpdateTrain(camera,traindata,control){
xh = trainmodel.children[rs].rotalist.length;
}
}
//console.log(trainmodel.children[rs].rotalist.length);
}
}
}
@ -103,7 +99,6 @@ export function UpdateTrain(camera,traindata,control){
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]);
@ -126,13 +121,10 @@ export function UpdateTrain(camera,traindata,control){
xh = trainmodel.children[rs].rotalist.length;
}
}
//console.log(trainmodel.children[rs].rotalist.length);
}
}
// console.log(trainmodel.rotalist);
}
trainmodel.progress += trainmodel.speeds;
}
@ -152,9 +144,6 @@ export function UpdateTrain(camera,traindata,control){
trainmodel.nextcode = null;
}
// console.log(trainmodel.name);
// console.log(trainmodel.progress);
// console.log(trainmodel.nextcurve);
// if(trainmodel.status == "02"){
// trainmodel.progress = 0;
// }else if(trainmodel.status == "03"){
@ -197,7 +186,6 @@ export function UpdateTrain(camera,traindata,control){
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);
@ -219,7 +207,6 @@ export function UpdateTrain(camera,traindata,control){
xh = trainmodel.children[rs].rotalist.length;
}
}
//console.log(trainmodel.children[rs].rotalist.length);
}
}
}
@ -256,7 +243,6 @@ export function UpdateTrain(camera,traindata,control){
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]);
@ -279,16 +265,12 @@ export function UpdateTrain(camera,traindata,control){
xh = trainmodel.children[rs].rotalist.length;
}
}
//console.log(trainmodel.children[rs].rotalist.length);
}
}
// console.log(trainmodel.rotalist);
}
// console.log(trainmodel.nextcurve);
if(trainmodel.progress > -(trainmodel.speeds)){
trainmodel.progress += trainmodel.speeds;
}

View File

@ -106,7 +106,6 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
let topic = '/user/queue/simulation/'+ group +'/jl3d';
let header = {'X-Token': token};
try {
// console.log("teststomp");
teststomp.subscribe(topic, callback, header);
} catch (error) {
console.error('websocket订阅失败');
@ -120,7 +119,6 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
// scope.selectmodel(data);
// }else{
if(data.type == "DeviceCtrl_3D"){
// console.log(data.body);
if(data.body.code == scope.nowcode){
scope.updateaction(data.body);
}
@ -143,7 +141,6 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
this.anime = null;
this.modelmanager = new ModelManager();
console.log(skinCode);
getPublish3dMapDetail(skinCode).then(netdata => {
let netDataAssets = JSON.parse(netdata.data.assets);
setpsdstationmap(JSON.parse(netdata.data.stands));
@ -206,7 +203,6 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
}
this.selectmodel = function (data) {
console.log(data);
if (scope.showmodel) {
if (scope.showmodel.code != data.code) {
@ -250,7 +246,6 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
}
if (data.type == "STAND") {
// console.log(data);
scope.modelmanager.standmodel.code = data.code;
scope.showmodel = scope.modelmanager.standmodel.mesh;
scope.scene.add(scope.showmodel);
@ -267,7 +262,6 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
}
if (data.type == "SECTION") {
// console.log(data);
scope.modelmanager.sectionmodel.code = data.code;
scope.showmodel = scope.modelmanager.sectionmodel.mesh;
scope.scene.add(scope.showmodel);
@ -285,7 +279,6 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
} else {
scope.nowcode = data.code;
if (data.type == "room") {
// console.log(scope.modelmanager.roommodel.mesh);
scope.showmodel = scope.modelmanager.roommodel.mesh;
scope.scene.add(scope.showmodel);
scope.camera.position.set(5, 7, -9);
@ -409,7 +402,6 @@ export function Jl3dfaultdevice(dom,group,token,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);
@ -548,13 +540,11 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
scope.modelmanager.standmodel.action.play();
}
this.updateselect = function(updata){
// console.log(updata);
if(helpbox){
scope.scene.remove( helpbox );
helpbox = null;
}
helpbox = new THREE.BoxHelper( updata.mesh, 0xff0000 );
// console.log(updata.mesh);
let point = {
x:updata.mesh.matrixWorld.elements[12],
y:updata.mesh.matrixWorld.elements[13],
@ -566,7 +556,6 @@ export function Jl3dfaultdevice(dom,group,token,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){
@ -730,7 +719,6 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
textplane.position.x = point.x;
textplane.position.y = point.y+6;
textplane.position.z = point.z;
// console.log(textplane.position);
// textplane.tcode = data[i].code;
textplane.rotation.y = -Math.PI/2;
textplane.lookAt(scope.camera.position);
@ -764,7 +752,6 @@ export function Jl3dfaultdevice(dom,group,token,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("设备部件:"+text, 90,30);
// ctx.fillText("车组人员:XXX", 40,20);

View File

@ -700,7 +700,6 @@ export function jl3dFaultDeviceVr(dom,group,skinCode) {
function onSelectStart( event ) {
var controller = event.target;
// console.log(event);
let clickGui = getGuiButton(controller);
if(clickGui.length > 0){
if(positionStatus == "dm"){
@ -853,9 +852,7 @@ export function jl3dFaultDeviceVr(dom,group,skinCode) {
}else{
var intersections = getIntersections( controller );
// console.log(intersections);
if ( intersections) {
// console.log(intersections);
var intersection = intersections[ 0 ];
if(intersection.distance <3.5){
if(positionStatus != intersection.object.name){
@ -886,14 +883,12 @@ export function jl3dFaultDeviceVr(dom,group,skinCode) {
let posx = intersection.point.x - trainControl.toptrain.position.x;
let posz = intersection.point.z - trainControl.toptrain.position.z;
human.position.set( posx, intersection.point.y+0.6, posz);
// console.log(human.position);
}
if(positionStatus == "downfloor"){
let posx = trainControl.downtrain.position.x - intersection.point.x;
let posz = trainControl.downtrain.position.z - intersection.point.z;
human.position.set( posx, intersection.point.y+0.6, posz);
// console.log(human.position);
}
let postData = {
type:"syn",
@ -929,9 +924,7 @@ export function jl3dFaultDeviceVr(dom,group,skinCode) {
// if ( intersections.length > 0 ) {
//
// // for(){}
// // console.log(intersections);
// var intersection = intersections[ 0 ];
// // console.log(intersection);
// // tempMatrix.getInverse( controller.matrixWorld );
// //
// // var object = intersection.object;
@ -957,7 +950,6 @@ export function jl3dFaultDeviceVr(dom,group,skinCode) {
}
function squeezeStart(){
console.log("squeeze");
scope.modelmanager.otherDevice.action.play();
if(positionStatus == "dm"){
if(vrPlaneStatus){
@ -986,7 +978,6 @@ export function jl3dFaultDeviceVr(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);
@ -1022,7 +1013,6 @@ export function jl3dFaultDeviceVr(dom,group,skinCode) {
raycastervr.ray.direction.set( 0, 0, - 1 ).applyMatrix4( tempMatrix );
for(let i=0;i<3;i++){
let rayObject = raycastervr.intersectObject( floors[i]);
// console.log(rayObject);
if(rayObject.length>0){
return rayObject;
}
@ -1073,7 +1063,6 @@ export function jl3dFaultDeviceVr(dom,group,skinCode) {
if ( intersections) {
var intersection = intersections[ 0 ];
// console.log(intersection);
if(intersection.distance <3.5){
var object = intersection.object;
circle.position.set( intersection.point.x, intersection.point.y+0.05, intersection.point.z );
@ -1131,7 +1120,6 @@ export function jl3dFaultDeviceVr(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){
@ -1205,7 +1193,6 @@ export function jl3dFaultDeviceVr(dom,group,skinCode) {
}
// console.log(scope.nowstation);
}
function initstationanimation(object){

View File

@ -299,7 +299,6 @@ export function MoveanimateVr(main){
}
//动画播放器
this.animateupdate = function(){
// console.log(scope.animatelist);
if(scope.enable){
if(scope.playlist){
@ -335,7 +334,6 @@ export function MoveanimateVr(main){
}else{
// console.log(scope.animatelist[k].connectmodel);
if(scope.nowmodelname != scope.playlist[scope.playorder][i].connectmodel.name){
scope.nowmodelname = scope.playlist[scope.playorder][i].connectmodel.name;
main.animationmsgshowon(scope.playlist[scope.playorder][i].connectmodel);

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

@ -277,8 +277,6 @@ export function VrGui(){
//
// let nowGroupComponent = scope.homeGroup;
this.setStationPlane = function(stations){
// console.log(stations);
// console.log(textures);
let posX,posY;
for(let i=0,leni = stations.length;i<leni;i++){
@ -368,7 +366,6 @@ export function VrGui(){
}
this.updataDeviceFaultMsg = function(faultData){
console.log(faultData);
let textt = new THREE.CanvasTexture(getTextCanvas(faultData,"faultMsg"));
scope.deviceGroup.getObjectByName("deviceText").material.map = textt;
scope.deviceGroup.getObjectByName("deviceText").material.map.needsUpdate = true;
@ -474,7 +471,6 @@ export function VrGui(){
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.name, 64,32);
//ctx.fillText(text.trainModel.name, width/2,height*3/4);
@ -493,7 +489,6 @@ export function VrGui(){
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("故障设备编号:", 64,16);
ctx.fillText(text.name, 64,48);
@ -513,7 +508,6 @@ export function VrGui(){
ctx.textAlign = 'center';
ctx.textBaseline = 'middle';
ctx.clearRect(0,0,256,256);
//console.log(text.groupNumber);
ctx.drawImage(beauty,0,0,256, 256);
ctx.fillText("当前车站信息", 128,32);
ctx.fillText("车站名:"+text.name, 128,64);
@ -540,7 +534,6 @@ export function VrGui(){
ctx.textAlign = 'center';
ctx.textBaseline = 'middle';
ctx.clearRect(0,0,256,256);
//console.log(text.groupNumber);
ctx.drawImage(beauty,0,0,256, 256);
ctx.fillText("当前故障信息", 128,32);
ctx.fillText("故障设备:"+text.code, 128,64);

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

@ -55,13 +55,7 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
// if(event.data.deviceType == "TRAIN"){
// // console.log(event.data);
//
// }
// console.log(event.data);
if(event.data.type == "Device_Fault_Set_3D"){
// console.log(event.data);
let newfault = {
code:event.data.body.code,
name:'',
@ -240,19 +234,16 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
// 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;
// }
//
@ -297,7 +288,6 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
this.socketon = function(topic) {
try {
// console.log("teststomp");
// scope.teststomp.subscribe(topic, callback, header);
} catch (error) {
console.error('websocket订阅失败');
@ -348,7 +338,6 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
}
}
// console.log(data);
if(trainlisttest.list[code].dispose == "0"){
if (data.right == '1') { // 向右
@ -398,7 +387,6 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
}
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<6;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]);
@ -406,11 +394,6 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
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 != 5){
let asd = trainlisttest.list[code].children[rs].rotalist[0];
trainlisttest.list[code].children[rs+1].rotalist.push(asd);
@ -424,7 +407,6 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
xh = trainlisttest.list[code].children[rs].rotalist.length;
}
}
//console.log(trainlisttest.list[code].children[rs].rotalist.length);
}
}
}
@ -481,7 +463,6 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
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<6;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);
@ -504,13 +485,11 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
xh = trainlisttest.list[code].children[rs].rotalist.length;
}
}
//console.log(trainlisttest.list[code].children[rs].rotalist.length);
}
}
// console.log(trainlisttest.list[code].rotalist);
}
}
@ -523,7 +502,6 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
}
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

@ -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

@ -76,7 +76,6 @@ export function PassflowConnect(deviceaction, toptrain, downtrain, routegroup, p
}
if (downtrain.nowcode == data.body.trainCode) {
// console.log(data.body);
if (data.body.command == 'G') {
closetraindoor(downtrain, data.body.code, 'down');

View File

@ -221,7 +221,6 @@ export function Jl3dpassflow(dom,skinCode,routegroup,viewMap) {
passerAi.initPasser(humanlist,passerHuman);
let updateaianimate = setInterval(
function(){
// console.log("?");
if(aiswitch == 0){
passerHuman.moveAnimateUpdate(humanlist,olddataai,passerHuman);
passerAi.aiUpdate(humanlist,passerHuman,passerCheckDoor,deviceaction);
@ -244,7 +243,6 @@ export function Jl3dpassflow(dom,skinCode,routegroup,viewMap) {
passerWebWork.onmessage = function (event) {
if(aiswitch == 0){
// console.log(humanlist.children.length);
if(humanlist.children.length < 80){
let direct = Math.floor(Math.random()*(3-1+1))+1;
//1--top

View File

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

View File

@ -61,7 +61,6 @@ export function PasserHuman() {
newhuman.speed = 0;
newhuman.mixer = mixer;
humanlist.add(newhuman);
// console.log(humanlist.children.length);
}
//定义新模型走路动画
this.initMoveAnimate = function(model,name,points,index){
@ -73,7 +72,6 @@ export function PasserHuman() {
// progress动画进度
// enable当前动画开关
// speed动画速度
// console.log(curve);
model.action.play();
model.progress = 0;
@ -129,7 +127,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;
}
@ -138,9 +135,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);
}

View File

@ -188,10 +188,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

@ -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

@ -243,11 +243,8 @@ export function Moveanimate(main){
// points.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
// scope.initanimate(switchmodel.children[i],switchmodel.name+"select1",points,true);
let modelorderlist = [];
console.log(switchmodel);
for(let i=0;i<switchmodel.children.length;i++){
console.log(switchmodel.children[i].name);
console.log(switchmodel.children[i]);
}
// for(let i=0;i<switchmodel.children.length;i++){
// }
modelorderlist[switchmodel.animacode] = [
{name:"SJ",pos:[-3.5,0,-1]},
{name:"ZZJJG",pos:[0,9,0]},
@ -275,16 +272,12 @@ export function Moveanimate(main){
scope.animatelist[switchmodel.animacode+"on"] = [];
scope.animatelist[switchmodel.animacode+"off"] = [];
console.log("==========");
for(let i=0,leni=modelorderlist[switchmodel.animacode].length;i<leni;i++){
let orderdata = modelorderlist[switchmodel.animacode];
console.log(switchmodel.animacode);
console.log(orderdata[i].name);
let modelon = switchmodel.getObjectByName(orderdata[i].name);
// modelon.helpbox = undefined;
console.log(modelon);
let pointson = [];
pointson.push(new THREE.Vector3(modelon.position.x,modelon.position.y,modelon.position.z));
pointson.push(new THREE.Vector3(modelon.position.x+orderdata[i].pos[0],modelon.position.y+orderdata[i].pos[1],modelon.position.z+orderdata[i].pos[2]));
@ -401,7 +394,6 @@ export function Moveanimate(main){
}
}else{
// console.log(scope.animatelist[k].connectmodel);
if(scope.nowmodelname != scope.playlist[scope.playorder][i].connectmodel.name){
scope.nowmodelname = scope.playlist[scope.playorder][i].connectmodel.name;
main.animationmsgshowon(scope.playlist[scope.playorder][i].connectmodel);

View File

@ -232,9 +232,6 @@ export function Textconfig(){
part.msg = "用于机内外电缆连接,方便更换转辙机。";
selectmodel.children[i].text = "二十位插接件";
}
// if(part.text == null){
// console.log(selectmodel.children[i].name);
// }
if(part.text){
scope.devicelist.push(part);
}

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;
@ -865,10 +856,6 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
}
}
if (data._type == "Signal") {
console.log(data);
}
}

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;
@ -425,7 +423,6 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
realsectionlist = loadrealsectionlist;
rails = loadrails;
console.log(trainlisttest.group);
trainlisttest.group.children[0].add(cameracctv);
}
@ -440,7 +437,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 +455,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 +527,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,30 @@ 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 +211,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 +296,6 @@ export function AssetLoader(){
scene.add(newmesh);
loadingInstance.close();
//console.log("add");
} );
}
@ -414,7 +395,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);
}
@ -228,7 +223,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
// if(updateTrainModel.children[1].rotalist.length > 0 || updateTrainModel.children[2].rotalist.length > 0 || updateTrainModel.children[3].rotalist.length > 0 || updateTrainModel.children[4].rotalist.length > 0|| updateTrainModel.children["black"].rotalist.length > 0){
for(let rs = 1;rs<updateTrainModel.children.length;rs++){
//console.log(rs);
if(updateTrainModel.children[rs].rotalist[0]){
let offsetz = parseFloat(updateTrainModel.children[rs].rotalist[0].posr.z) + parseFloat(updateTrainModel.children[rs].position.z);
@ -251,13 +245,11 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
xh = updateTrainModel.children[rs].rotalist.length;
}
}
//console.log(trainmodel.children[rs].rotalist.length);
}
}
// console.log(trainmodel.rotalist);
// }
}else{
@ -303,7 +295,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
// if(updateTrainModel.children[1].rotalist.length > 0 || updateTrainModel.children[2].rotalist.length > 0 || updateTrainModel.children[3].rotalist.length > 0 || updateTrainModel.children[4].rotalist.length > 0|| updateTrainModel.children["black"].rotalist.length > 0){
for(let rs = 1;rs<updateTrainModel.children.length;rs++){
//console.log(rs);
if(updateTrainModel.children[rs].rotalist[0]){
let offsetz = parseFloat(updateTrainModel.children[rs].rotalist[0].posr.z) - parseFloat(updateTrainModel.children[rs].matrixWorld.elements[14]);

View File

@ -4,11 +4,9 @@ export function UpdateTrain(camera,traindata,control){
if(traindata != undefined && traindata.group.children[0]){//traindata.group.children[0].dispose == false
if(traindata.group.children[0].progress != null){
// console.log(traindata.group);
let trainmodel = traindata.group.children[0];
if(trainmodel.speeds > 0 && trainmodel.speeds){
let speed = null;
// console.log(traindata.group.children[0].progress);
if(traindata.group.children[0].progress >=0&&traindata.group.children[0].progress<=1){
let movecurve = trainmodel.curve;
@ -44,7 +42,6 @@ export function UpdateTrain(camera,traindata,control){
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);
@ -66,7 +63,6 @@ export function UpdateTrain(camera,traindata,control){
xh = trainmodel.children[rs].rotalist.length;
}
}
//console.log(trainmodel.children[rs].rotalist.length);
}
}
}
@ -103,7 +99,6 @@ export function UpdateTrain(camera,traindata,control){
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]);
@ -126,13 +121,10 @@ export function UpdateTrain(camera,traindata,control){
xh = trainmodel.children[rs].rotalist.length;
}
}
//console.log(trainmodel.children[rs].rotalist.length);
}
}
// console.log(trainmodel.rotalist);
}
trainmodel.progress += trainmodel.speeds;
}
@ -152,9 +144,6 @@ export function UpdateTrain(camera,traindata,control){
trainmodel.nextcode = null;
}
// console.log(trainmodel.name);
// console.log(trainmodel.progress);
// console.log(trainmodel.nextcurve);
// if(trainmodel.status == "02"){
// trainmodel.progress = 0;
// }else if(trainmodel.status == "03"){
@ -197,7 +186,6 @@ export function UpdateTrain(camera,traindata,control){
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);
@ -219,7 +207,6 @@ export function UpdateTrain(camera,traindata,control){
xh = trainmodel.children[rs].rotalist.length;
}
}
//console.log(trainmodel.children[rs].rotalist.length);
}
}
}
@ -256,7 +243,6 @@ export function UpdateTrain(camera,traindata,control){
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]);
@ -279,16 +265,12 @@ export function UpdateTrain(camera,traindata,control){
xh = trainmodel.children[rs].rotalist.length;
}
}
//console.log(trainmodel.children[rs].rotalist.length);
}
}
// console.log(trainmodel.rotalist);
}
// console.log(trainmodel.nextcurve);
if(trainmodel.progress > -(trainmodel.speeds)){
trainmodel.progress += trainmodel.speeds;
}

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

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

View File

@ -57,7 +57,6 @@ export function stationConnect(deviceaction,toptrain,downtrain,routegroup,passer
if(passerStation.stationlist[j].topstand == newStandData[i].standCode){
// console.log(passerStation.stationlist[j]);
passerStation.stationlist[j].topspeed = newStandData[i].to;
passerStation.stationlist[j].toppassers = newStandData[i].num;
count++;
@ -70,7 +69,6 @@ export function stationConnect(deviceaction,toptrain,downtrain,routegroup,passer
}
if(count == 2){
// console.log(passerStation.stationlist[j]);
i = newStandData.length;
}
}
@ -116,7 +114,6 @@ export function stationConnect(deviceaction,toptrain,downtrain,routegroup,passer
let actions;
function opentraindoor(train,doorcode,direct){
// console.log(train);
if(direct == "top"){
// if(doorcode == "1"){
// actions = train.action.down;

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

@ -218,7 +218,6 @@ export function Jl3dStationManager(dom,skinCode,routegroup,initCode) {
});
this.initTrafficStart = function(){
console.log("initTrafficStart");
passerStation.initCodeStation(initCode);
scope.humanWaitTop = passerStation.nowStation.toppassers;
scope.humanWaitDown = passerStation.nowStation.downpassers;
@ -233,7 +232,6 @@ export function Jl3dStationManager(dom,skinCode,routegroup,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;
@ -244,7 +242,6 @@ export function Jl3dStationManager(dom,skinCode,routegroup,initCode) {
}
this.updateNowStationData = function(){
// console.log(passerStation.nowStation);
for(let i=0;i<passerStation.nowStation.topspeed;i++){
let newIn = {
overGoal:"top",
@ -350,7 +347,6 @@ export function Jl3dStationManager(dom,skinCode,routegroup,initCode) {
updateaianimate = setInterval(
function(){
// console.log("?");
if(aiswitch == 0){
updatePasserData(humanlist.children.length,topWaitPassers.children.length,downWaitPassers.children.length,outStationPassers.children.length,passerHuman.speed);
@ -393,12 +389,8 @@ export function Jl3dStationManager(dom,skinCode,routegroup,initCode) {
passerWebWork.onmessage = function (event) {
if(aiswitch == 0){
// console.log(humanlist.children.length);
// console.log(sceneRegion.startRegion.group.children);
this.allStationData = [];
// console.log(Math.random());
// console.log(waitForCreatIn);
if(waitForCreatIn.length>0){
let randomNum = Math.random();
let startNum = 0;
@ -437,7 +429,6 @@ export function Jl3dStationManager(dom,skinCode,routegroup,initCode) {
// raycaster.setFromCamera( mouse, camerass );
//
// let intersects = raycaster.intersectObject(scope.modelmanager.station.mesh,true);
// console.log(intersects[0].point);
// }
// }
@ -555,7 +546,6 @@ export function Jl3dStationManager(dom,skinCode,routegroup,initCode) {
//循环渲染函数
function animate() {
render();
// console.log(passerRender);
// if(passerRender.state == "freeview"){
controls.update();
// }

View File

@ -124,11 +124,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);
});
});
@ -142,8 +140,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

@ -124,11 +124,9 @@ export function PasserHuman() {
if(direct == "top"){
waitForCreatOutTop = getnum(outNum,standRegion.belongList["top"].length-1);
// console.log(waitForCreatOutTop);
for(let i=0;i<waitForCreatOutTop.length;i++){
for(let j=0;j<waitForCreatOutTop[i];j++){
setTimeout(function(){
// console.log(sceneRegion.list["standtop"].doorpoints[i]);
createLeaveHumanModel(outStationPassers,standRegion.belongList["top"][i].position,startRegion);
}, Math.random()*1000*j);
@ -139,7 +137,6 @@ export function PasserHuman() {
for(let i=0;i<waitForCreatOutDown.length;i++){
for(let j=0;j<waitForCreatOutDown[i];j++){
setTimeout(function(){
// console.log(sceneRegion.list["standdown"].doorpoints[i]);
createLeaveHumanModel(outStationPassers,standRegion.belongList["down"][i].position,startRegion);
}, Math.random()*1000*j);
}
@ -240,7 +237,6 @@ export function PasserHuman() {
// progress动画进度
// enable当前动画开关
// speed动画速度
// console.log(curve);
// model.action.play();
model.progress = 0;
@ -303,9 +299,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);
//更新模型坐标
@ -338,9 +331,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);
//更新模型坐标
@ -391,16 +381,11 @@ export function PasserHuman() {
humanlist.children[i].nowGoal = "checkRegion";
}else if(humanlist.children[i].nowGoal == "ticketRegion"){
// // console.log(humans[i].doors);
// zhajiin[humanlist.children[i].doors].waiting = 0;
humanlist.children[i].nowGoal = "securityRegion";
}
}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

@ -42,7 +42,6 @@ export function PasserStation() {
let newclip = object.animations[ 0 ];
let standfloor = object.getObjectByName("1CENG");
console.log(object);
for(let j=0;j<standfloor.children.length;j++){
if(standfloor.children[j].name == "top"){
@ -102,7 +101,6 @@ export function PasserStation() {
originDownPosition.copy(scope.down.position);
scope.topfloor = object.getObjectByName("1floor");
scope.downfloor = object.getObjectByName("2floor");
// console.log(deviceaction);
scene.add(object);
}
@ -185,9 +183,7 @@ export function PasserStation() {
};
this.initCodeStation = function(initCode){
console.log(scope.stationlist);
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

@ -203,7 +203,6 @@ export function checkRegion(data) {
//闸机动画控制
this.checkDoorControl = function(type,door,deviceaction){
let checkDoorId = door;
console.log();
if(type == "in"){
// let checkDoorId = scope.zhajiin[devicenum].id;
deviceaction[checkDoorId].action.reset();

View File

@ -99,7 +99,6 @@ export function regionManager() {
//存储区域数据
this.saveRegionData = function(){
// console.log();
let newSaveData = {
startRegion:[],
securityRegion:[],

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));
@ -333,11 +326,6 @@ export function PasserAi(finder,region) {
if(humanlist.children[i].nowGoal == "inCheck"){
let points = [];
// console.log();
// console.log(region.checkRegion.group.children[humanlist.children[i].checkDoor].position);
// console.log(region.checkRegion.group.children[humanlist.children[i].checkDoor].getObjectByName("regionHead").getWorldPosition(new THREE.Vector3()));
// console.log(region.checkRegion.group.children[humanlist.children[i].checkDoor].getObjectByName("regionDirect").getWorldPosition(new THREE.Vector3()));
// console.log("================");
points.push(region.checkRegion.group.children[humanlist.children[i].checkDoor].getObjectByName("regionHead").getWorldPosition(new THREE.Vector3()));
points.push(region.checkRegion.group.children[humanlist.children[i].checkDoor].getObjectByName("regionDirect").getWorldPosition(new THREE.Vector3()));

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;

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