Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
4c9d9b6705
@ -165,7 +165,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
|
|||||||
|
|
||||||
// datanew();
|
// datanew();
|
||||||
|
|
||||||
DriverLoadNew(mapnetdata,scope,netdata.data,mapdata,sectionlist,signallist,switchlist,stationstandlist,trainlisttest,rails,camera,controls3,scene,mixers);
|
DriverLoadNew(mapnetdata,scope,netdata.data,mapdata,sectionlist,signallist,switchlist,stationstandlist,trainlisttest,rails,camera,controls3,scene,mixers,project);
|
||||||
var timer = setInterval(function() {
|
var timer = setInterval(function() {
|
||||||
if(trainlisttest){
|
if(trainlisttest){
|
||||||
if(trainlisttest.group){
|
if(trainlisttest.group){
|
||||||
|
@ -38,7 +38,6 @@ import {Stats} from '@/jlmap3d/main/lib/stats.min.js';
|
|||||||
var clock = new THREE.Clock();
|
var clock = new THREE.Clock();
|
||||||
|
|
||||||
export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) {
|
export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) {
|
||||||
|
|
||||||
let scope = this;
|
let scope = this;
|
||||||
|
|
||||||
this.dom = dom;
|
this.dom = dom;
|
||||||
@ -120,7 +119,7 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) {
|
|||||||
scope.jsonwebworknew = new Worker(JL3D_LOCAL_STATIC+"/workertest/jsonworkernew.js");
|
scope.jsonwebworknew = new Worker(JL3D_LOCAL_STATIC+"/workertest/jsonworkernew.js");
|
||||||
scope.Subscribe = new Jlmap3dSubscribeNew(scope,routegroup,scope.jsonwebworknew);
|
scope.Subscribe = new Jlmap3dSubscribeNew(scope,routegroup,scope.jsonwebworknew);
|
||||||
scope.Subscribe.socketon(scope.Subscribe.topic);
|
scope.Subscribe.socketon(scope.Subscribe.topic);
|
||||||
SimulationLoadNew(mapnetdata,scope,netdata.data,mapdata,camera,controls,scenesimulation,storemod);
|
SimulationLoadNew(mapnetdata,scope,netdata.data,mapdata,camera,controls,scenesimulation,project);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -107,6 +107,34 @@ let autoswitch2 = {
|
|||||||
url:BASE_ASSET_API+"/MODEL/2020-07-10/17-43789.FBX"
|
url:BASE_ASSET_API+"/MODEL/2020-07-10/17-43789.FBX"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
let nologonc = {
|
||||||
|
id:"n1",
|
||||||
|
name:"高架内侧车站",
|
||||||
|
deviceType:"nologonc",
|
||||||
|
type:"nologonc",
|
||||||
|
picUrl:"",
|
||||||
|
url:"/MODEL/2021-11-26/531-67215.FBX"
|
||||||
|
}
|
||||||
|
|
||||||
|
let nologowc = {
|
||||||
|
id:"n2",
|
||||||
|
name:"高架外侧车站",
|
||||||
|
deviceType:"nologowc",
|
||||||
|
type:"nologowc",
|
||||||
|
picUrl:"",
|
||||||
|
url:"/MODEL/2021-11-26/532-84618.FBX"
|
||||||
|
}
|
||||||
|
|
||||||
|
let nologohc = {
|
||||||
|
id:"n3",
|
||||||
|
name:"换乘车站",
|
||||||
|
deviceType:"nologohc",
|
||||||
|
type:"nologohc",
|
||||||
|
picUrl:"",
|
||||||
|
url:"/MODEL/2021-11-26/534-3276.FBX"
|
||||||
|
}
|
||||||
|
|
||||||
export function AssetLoader(){
|
export function AssetLoader(){
|
||||||
|
|
||||||
let scope = this;
|
let scope = this;
|
||||||
@ -168,47 +196,45 @@ export function AssetLoader(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
this.setModelListOver = function (data,trainoffset,others){
|
this.setModelListOver = function (data,trainoffset,others,project){
|
||||||
if(trainoffset){
|
if(trainoffset){
|
||||||
scope.trainoffset = trainoffset;
|
scope.trainoffset = trainoffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(project == "nologo"){
|
||||||
|
let nologoStationNc = new AssetModel(nologonc);
|
||||||
|
scope.modellist.push(nologonc);
|
||||||
|
|
||||||
|
let nologoStationWc = new AssetModel(nologowc);
|
||||||
|
scope.modellist.push(nologowc);
|
||||||
|
|
||||||
|
let nologoStationHc = new AssetModel(nologohc);
|
||||||
|
scope.modellist.push(nologohc);
|
||||||
|
}
|
||||||
if(others){
|
if(others){
|
||||||
let otherData = others;
|
let otherData = others;
|
||||||
// console.log(data);
|
|
||||||
for(let j=0;j<otherData.length;j++){
|
for(let j=0;j<otherData.length;j++){
|
||||||
let model = new AssetModel(otherData[j]);
|
let model = new AssetModel(otherData[j]);
|
||||||
// console.log(otherData[j]);
|
|
||||||
scope.modellist.push(otherData[j]);
|
scope.modellist.push(otherData[j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let modeldata = data;
|
let modeldata = data;
|
||||||
|
|
||||||
for(let j=0;j<modeldata.length;j++){
|
for(let j=0;j<modeldata.length;j++){
|
||||||
let had = false;
|
let had = false;
|
||||||
for(let i=0;i<scope.modellist.length;i++){
|
for(let i=0;i<scope.modellist.length;i++){
|
||||||
|
|
||||||
if(scope.modellist[i].id == modeldata[j].id){
|
if(scope.modellist[i].id == modeldata[j].id){
|
||||||
|
|
||||||
had = true;
|
had = true;
|
||||||
|
|
||||||
i = scope.modellist.length;
|
i = scope.modellist.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(had == false){
|
if(had == false){
|
||||||
if(modeldata[j].url != ""){
|
if(modeldata[j].url != ""){
|
||||||
let model = new AssetModel(modeldata[j]);
|
let model = new AssetModel(modeldata[j]);
|
||||||
scope.modellist.push(modeldata[j]);
|
scope.modellist.push(modeldata[j]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -218,7 +244,6 @@ export function AssetLoader(){
|
|||||||
scope.trainoffset = trainoffset;
|
scope.trainoffset = trainoffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let modeldata = JSON.parse(data);
|
let modeldata = JSON.parse(data);
|
||||||
|
|
||||||
for(let j=0;j<modeldata.assets.length;j++){
|
for(let j=0;j<modeldata.assets.length;j++){
|
||||||
|
@ -14,7 +14,7 @@ import {TdtList} from '@/jlmap3d/main/newmodel/TdtList.js';
|
|||||||
import { Loading } from 'element-ui';
|
import { Loading } from 'element-ui';
|
||||||
// import {SwitchModel} from '@/jlmap3d/model/SwitchModel.js';
|
// import {SwitchModel} from '@/jlmap3d/model/SwitchModel.js';
|
||||||
|
|
||||||
export function DriverLoadNew(data,scope,netdata,mapdata,sectionlist,signallist,switchlist,stationstandlist,trainlisttest,rails,camera,controls,scene,mixerss){
|
export function DriverLoadNew(data,scope,netdata,mapdata,sectionlist,signallist,switchlist,stationstandlist,trainlisttest,rails,camera,controls,scene,mixerss,project){
|
||||||
//console.log(mapdata);
|
//console.log(mapdata);
|
||||||
|
|
||||||
//console.log(data);
|
//console.log(data);
|
||||||
@ -81,11 +81,11 @@ export function DriverLoadNew(data,scope,netdata,mapdata,sectionlist,signallist,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
assetloader.setModelListOver(JSON.parse(netdata.assets).sceneAssetList,0,JSON.parse(netdata.assets).others);
|
assetloader.setModelListOver(JSON.parse(netdata.assets).sceneAssetList,0,JSON.parse(netdata.assets).others,project);
|
||||||
|
|
||||||
assetloader.assetPromiseOver(sceneload)
|
assetloader.assetPromiseOver(sceneload)
|
||||||
.then(function(data){
|
.then(function(data){
|
||||||
return stationstandlist.loadpromise(mapdata.stationList,standsdata,psddata,sceneload,assetloader,mixers,actions,"01",JSON.parse(netdata.assets).others);
|
return stationstandlist.loadpromise(mapdata.stationList,standsdata,psddata,sceneload,assetloader,mixers,actions,"01",JSON.parse(netdata.assets).others,project);
|
||||||
})
|
})
|
||||||
.then(function(data){
|
.then(function(data){
|
||||||
return sectionlist.loadpromise(mapdata.sectionList,sectiondata.section,rails,scene,assetloader);
|
return sectionlist.loadpromise(mapdata.sectionList,sectiondata.section,rails,scene,assetloader);
|
||||||
|
@ -14,7 +14,7 @@ import store from '@/store/index';
|
|||||||
// import { Loading } from 'element-ui';
|
// import { Loading } from 'element-ui';
|
||||||
// import {SwitchModel} from '@/jlmap3d/model/SwitchModel.js';
|
// import {SwitchModel} from '@/jlmap3d/model/SwitchModel.js';
|
||||||
|
|
||||||
export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,scene){
|
export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,scene,project){
|
||||||
//console.log(mapdata);
|
//console.log(mapdata);
|
||||||
|
|
||||||
//console.log(data);
|
//console.log(data);
|
||||||
@ -76,7 +76,7 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
assetloader.setModelListOver(JSON.parse(netdata.assets).sceneAssetList,1.3,JSON.parse(netdata.assets).others);
|
assetloader.setModelListOver(JSON.parse(netdata.assets).sceneAssetList,1.3,JSON.parse(netdata.assets).others,project);
|
||||||
// assetloader.setmodellistnew(netdata.assets);
|
// assetloader.setmodellistnew(netdata.assets);
|
||||||
|
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
|
|||||||
//console.log(data);
|
//console.log(data);
|
||||||
//,netdata.stands,mixers,actions,"0"
|
//,netdata.stands,mixers,actions,"0"
|
||||||
|
|
||||||
return stationstandlist.loadpromise(mapdata.stationList,standsdata,psddata,sceneload,assetloader,mixers,actions,"02",JSON.parse(netdata.assets).others);
|
return stationstandlist.loadpromise(mapdata.stationList,standsdata,psddata,sceneload,assetloader,mixers,actions,"02",JSON.parse(netdata.assets).others,project);
|
||||||
})
|
})
|
||||||
.then(function(data){
|
.then(function(data){
|
||||||
//console.log(data);
|
//console.log(data);
|
||||||
|
@ -133,7 +133,7 @@ export function StationStandListN() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
this.loadpromise = function(stationdata,standsdata,psddata,scene,assetloader,mixers,actionss,mode,otherStation){
|
this.loadpromise = function(stationdata,standsdata,psddata,scene,assetloader,mixers,actionss,mode,otherStation,project){
|
||||||
return new Promise(function(resolve, reject){
|
return new Promise(function(resolve, reject){
|
||||||
// console.log(standsdata);
|
// console.log(standsdata);
|
||||||
let stations = stationdata;
|
let stations = stationdata;
|
||||||
@ -141,6 +141,9 @@ export function StationStandListN() {
|
|||||||
let selectmesh2;
|
let selectmesh2;
|
||||||
let selectmesh3;
|
let selectmesh3;
|
||||||
let specilmesh;
|
let specilmesh;
|
||||||
|
|
||||||
|
let nologonc,nologowc,nologohc;
|
||||||
|
|
||||||
for(let j=0;j<assetloader.modellist.length;j++){
|
for(let j=0;j<assetloader.modellist.length;j++){
|
||||||
// console.log(assetloader.modellist[j].type);
|
// console.log(assetloader.modellist[j].type);
|
||||||
if(assetloader.modellist[j].type == "stationInside"){
|
if(assetloader.modellist[j].type == "stationInside"){
|
||||||
@ -158,6 +161,20 @@ export function StationStandListN() {
|
|||||||
specilmesh = assetloader.modellist[j].mesh;
|
specilmesh = assetloader.modellist[j].mesh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(project == "nologo"){
|
||||||
|
if(assetloader.modellist[j].type == "nologonc"){
|
||||||
|
nologonc = assetloader.modellist[j].mesh;
|
||||||
|
// assetloader.modellist[num2].mesh.rotation.y = Math.PI/2;
|
||||||
|
}
|
||||||
|
if(assetloader.modellist[j].type == "nologowc"){
|
||||||
|
nologowc = assetloader.modellist[j].mesh;
|
||||||
|
// assetloader.modellist[num2].mesh.rotation.y = Math.PI/2;
|
||||||
|
}
|
||||||
|
if(assetloader.modellist[j].type == "nologohc"){
|
||||||
|
nologohc = assetloader.modellist[j].mesh;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
selectmesh1.traverse( function ( child ) {
|
selectmesh1.traverse( function ( child ) {
|
||||||
|
|
||||||
@ -203,6 +220,7 @@ export function StationStandListN() {
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
// console.log(psddata);
|
// console.log(psddata);
|
||||||
|
|
||||||
for(let i=0;i<standsdata.length;i++){
|
for(let i=0;i<standsdata.length;i++){
|
||||||
|
|
||||||
|
|
||||||
@ -244,6 +262,7 @@ export function StationStandListN() {
|
|||||||
}
|
}
|
||||||
if(nowModelType == "normal"){
|
if(nowModelType == "normal"){
|
||||||
if(standsdata[i].stands.length<=2){
|
if(standsdata[i].stands.length<=2){
|
||||||
|
|
||||||
if(standsdata[i].inside == undefined){
|
if(standsdata[i].inside == undefined){
|
||||||
newstationmesh = selectmesh1.clone(true);
|
newstationmesh = selectmesh1.clone(true);
|
||||||
newclip = selectmesh1.animations[ 0 ];
|
newclip = selectmesh1.animations[ 0 ];
|
||||||
@ -263,6 +282,25 @@ export function StationStandListN() {
|
|||||||
newstationmesh = specilmesh.clone(true);
|
newstationmesh = specilmesh.clone(true);
|
||||||
newclip = specilmesh.animations[ 0 ];
|
newclip = specilmesh.animations[ 0 ];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(project == "nologo"){
|
||||||
|
if(i == 1){
|
||||||
|
newstationmesh = nologohc.clone(true);
|
||||||
|
newclip = nologohc.animations[ 0 ];
|
||||||
|
}
|
||||||
|
if(i == 2){
|
||||||
|
newstationmesh = selectmesh2.clone(true);
|
||||||
|
newclip = selectmesh2.animations[ 0 ];
|
||||||
|
}
|
||||||
|
if(i == 3){
|
||||||
|
newstationmesh = nologonc.clone(true);
|
||||||
|
newclip = nologonc.animations[ 0 ];
|
||||||
|
}
|
||||||
|
if(i == 4){
|
||||||
|
newstationmesh = nologowc.clone(true);
|
||||||
|
newclip = nologowc.animations[ 0 ];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -289,6 +327,7 @@ export function StationStandListN() {
|
|||||||
|
|
||||||
if(addAnimaMesh){
|
if(addAnimaMesh){
|
||||||
newstationmesh.getObjectByName('door'+num).animations = [];
|
newstationmesh.getObjectByName('door'+num).animations = [];
|
||||||
|
if(newclip){
|
||||||
newstationmesh.getObjectByName('door'+num).animations.push(newclip.clone());
|
newstationmesh.getObjectByName('door'+num).animations.push(newclip.clone());
|
||||||
let mixer = new THREE.AnimationMixer( newstationmesh.getObjectByName('door'+num) );
|
let mixer = new THREE.AnimationMixer( newstationmesh.getObjectByName('door'+num) );
|
||||||
|
|
||||||
@ -314,6 +353,8 @@ export function StationStandListN() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if(mode){
|
if(mode){
|
||||||
if(mode == "02"){
|
if(mode == "02"){
|
||||||
let textgeometry = new THREE.PlaneBufferGeometry( 65, 90, 1 );
|
let textgeometry = new THREE.PlaneBufferGeometry( 65, 90, 1 );
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<div class="jl3dmap3dMaintainer">
|
<div class="jl3dmap3dMaintainer">
|
||||||
<div class="jl3dmap3dMaintainerSelect" :style="{'background-color': '#e4eaea'}">
|
<div class="jl3dmap3dMaintainerSelect" :style="{'background-color': '#e4eaea'}">
|
||||||
|
|
||||||
<div style="position:absolute;left:25%;top:10%;font-size:80px">
|
<div style="position:absolute;left:25%;top:10%;font-size:80px;">
|
||||||
<el-row>
|
<el-row>
|
||||||
城市轨道交通标准化培训软件
|
城市轨道交通标准化培训软件
|
||||||
|
|
||||||
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
<div class="lesson3dSelectButton"
|
<div class="lesson3dSelectButton"
|
||||||
:style="{'background-image': 'url('+localStatic+'/other/jy.png)'}"
|
:style="{'background-image': 'url('+localStatic+'/other/jy.png)'}"
|
||||||
style="left:65%;top:25%;" @click="enterPlayer()"></div>
|
style="left:65%;top:25%;" @click="enterPlayer(32)"></div>
|
||||||
|
|
||||||
<div class="lesson3dSelectButton"
|
<div class="lesson3dSelectButton"
|
||||||
:style="{'background-image': 'url('+localStatic+'/other/yx.png)'}"
|
:style="{'background-image': 'url('+localStatic+'/other/yx.png)'}"
|
||||||
@ -71,8 +71,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
enterPlayer:function () {
|
enterPlayer:function (id) {
|
||||||
this.$router.push({ path: '/jlmap3d/lcjy', query: {} });
|
// this.$router.push({ path: '/jlmap3d/lcjy', query: {} });
|
||||||
|
|
||||||
|
this.$router.push({ path: '/design/jlmap3d/lesson3dplayer', query: {lessonId:id} });
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -88,6 +90,7 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
z-index: 35;
|
z-index: 35;
|
||||||
|
text-align: center;
|
||||||
// color:#FFF;
|
// color:#FFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user