修改展示线路三维车站加载,修改徐州三维课程
This commit is contained in:
parent
94de3ba762
commit
7d734bc554
@ -165,7 +165,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
|
||||
|
||||
// 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() {
|
||||
if(trainlisttest){
|
||||
if(trainlisttest.group){
|
||||
|
@ -38,7 +38,6 @@ import {Stats} from '@/jlmap3d/main/lib/stats.min.js';
|
||||
var clock = new THREE.Clock();
|
||||
|
||||
export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) {
|
||||
|
||||
let scope = this;
|
||||
|
||||
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.Subscribe = new Jlmap3dSubscribeNew(scope,routegroup,scope.jsonwebworknew);
|
||||
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"
|
||||
}
|
||||
|
||||
|
||||
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(){
|
||||
|
||||
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){
|
||||
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){
|
||||
let otherData = others;
|
||||
// console.log(data);
|
||||
for(let j=0;j<otherData.length;j++){
|
||||
let model = new AssetModel(otherData[j]);
|
||||
// console.log(otherData[j]);
|
||||
scope.modellist.push(otherData[j]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let modeldata = data;
|
||||
|
||||
for(let j=0;j<modeldata.length;j++){
|
||||
let had = false;
|
||||
for(let i=0;i<scope.modellist.length;i++){
|
||||
|
||||
if(scope.modellist[i].id == modeldata[j].id){
|
||||
|
||||
had = true;
|
||||
|
||||
i = scope.modellist.length;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(had == false){
|
||||
if(modeldata[j].url != ""){
|
||||
let model = new AssetModel(modeldata[j]);
|
||||
scope.modellist.push(modeldata[j]);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -218,7 +244,6 @@ export function AssetLoader(){
|
||||
scope.trainoffset = trainoffset;
|
||||
}
|
||||
|
||||
|
||||
let modeldata = JSON.parse(data);
|
||||
|
||||
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 {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(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)
|
||||
.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){
|
||||
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 {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(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);
|
||||
|
||||
|
||||
@ -86,7 +86,7 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
|
||||
//console.log(data);
|
||||
//,netdata.stands,mixers,actions,"0"
|
||||
|
||||
return stationstandlist.loadpromise(mapdata.stationList,standsdata,psddata,sceneload,assetloader,mixers,actions,"02",JSON.parse(netdata.assets).others);
|
||||
return stationstandlist.loadpromise(mapdata.stationList,standsdata,psddata,sceneload,assetloader,mixers,actions,"02",JSON.parse(netdata.assets).others,project);
|
||||
})
|
||||
.then(function(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){
|
||||
// console.log(standsdata);
|
||||
let stations = stationdata;
|
||||
@ -141,6 +141,9 @@ export function StationStandListN() {
|
||||
let selectmesh2;
|
||||
let selectmesh3;
|
||||
let specilmesh;
|
||||
|
||||
let nologonc,nologowc,nologohc;
|
||||
|
||||
for(let j=0;j<assetloader.modellist.length;j++){
|
||||
// console.log(assetloader.modellist[j].type);
|
||||
if(assetloader.modellist[j].type == "stationInside"){
|
||||
@ -158,6 +161,20 @@ export function StationStandListN() {
|
||||
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 ) {
|
||||
|
||||
@ -203,6 +220,7 @@ export function StationStandListN() {
|
||||
//
|
||||
//
|
||||
// console.log(psddata);
|
||||
|
||||
for(let i=0;i<standsdata.length;i++){
|
||||
|
||||
|
||||
@ -244,6 +262,7 @@ export function StationStandListN() {
|
||||
}
|
||||
if(nowModelType == "normal"){
|
||||
if(standsdata[i].stands.length<=2){
|
||||
|
||||
if(standsdata[i].inside == undefined){
|
||||
newstationmesh = selectmesh1.clone(true);
|
||||
newclip = selectmesh1.animations[ 0 ];
|
||||
@ -263,6 +282,25 @@ export function StationStandListN() {
|
||||
newstationmesh = specilmesh.clone(true);
|
||||
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,27 +327,30 @@ export function StationStandListN() {
|
||||
|
||||
if(addAnimaMesh){
|
||||
newstationmesh.getObjectByName('door'+num).animations = [];
|
||||
newstationmesh.getObjectByName('door'+num).animations.push(newclip.clone());
|
||||
let mixer = new THREE.AnimationMixer( newstationmesh.getObjectByName('door'+num) );
|
||||
if(newclip){
|
||||
newstationmesh.getObjectByName('door'+num).animations.push(newclip.clone());
|
||||
let mixer = new THREE.AnimationMixer( newstationmesh.getObjectByName('door'+num) );
|
||||
|
||||
for(let n=0;n<psddata.length;n++){
|
||||
for(let n=0;n<psddata.length;n++){
|
||||
|
||||
if(psddata[n].standCode == standsdata[i].stands[j].code){
|
||||
if(psddata[n].standCode == standsdata[i].stands[j].code){
|
||||
|
||||
let key = psddata[n].code;
|
||||
actionss[key] = {
|
||||
status:"01",
|
||||
action:mixer.clipAction( newstationmesh.getObjectByName('door'+num).animations[0])
|
||||
};
|
||||
actionss[key].action.setLoop(THREE.LoopOnce);
|
||||
actionss[key].action.clampWhenFinished = true;
|
||||
//actionss[key].play();
|
||||
let key = psddata[n].code;
|
||||
actionss[key] = {
|
||||
status:"01",
|
||||
action:mixer.clipAction( newstationmesh.getObjectByName('door'+num).animations[0])
|
||||
};
|
||||
actionss[key].action.setLoop(THREE.LoopOnce);
|
||||
actionss[key].action.clampWhenFinished = true;
|
||||
//actionss[key].play();
|
||||
|
||||
n = psddata.length;
|
||||
n = psddata.length;
|
||||
}
|
||||
}
|
||||
|
||||
mixers.push(mixer);
|
||||
}
|
||||
|
||||
mixers.push(mixer);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div class="jl3dmap3dMaintainer">
|
||||
<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>
|
||||
城市轨道交通标准化培训软件
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
<div class="lesson3dSelectButton"
|
||||
: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"
|
||||
:style="{'background-image': 'url('+localStatic+'/other/yx.png)'}"
|
||||
@ -71,8 +71,10 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
|
||||
enterPlayer:function () {
|
||||
this.$router.push({ path: '/jlmap3d/lcjy', query: {} });
|
||||
enterPlayer:function (id) {
|
||||
// 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%;
|
||||
height: 100%;
|
||||
z-index: 35;
|
||||
text-align: center;
|
||||
// color:#FFF;
|
||||
}
|
||||
|
||||
|
@ -135,10 +135,10 @@ export default {
|
||||
|
||||
if (project) {
|
||||
|
||||
this.jlmap3d = new JLmap3d(dom, mapdata, skinCode, this.$store, group, project);
|
||||
this.jlmap3d = new JLmap3d(dom, mapdata, skinCode, this.$store, group, project);
|
||||
} else {
|
||||
|
||||
this.jlmap3d = new JLmap3d(dom, mapdata, skinCode, this.$store, group, '');
|
||||
this.jlmap3d = new JLmap3d(dom, mapdata, skinCode, this.$store, group, '');
|
||||
}
|
||||
this.jlmap3d.eventon();
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user