This commit is contained in:
fan 2020-07-22 14:59:11 +08:00
commit 0a5999bcd0
2 changed files with 16 additions and 1 deletions

View File

@ -230,6 +230,8 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
for(let i=0,leni=stationlist.length;i<leni;i++){ for(let i=0,leni=stationlist.length;i<leni;i++){
psdtexturemap[stationlist[i].direction1.code] = stationlist[i].code; psdtexturemap[stationlist[i].direction1.code] = stationlist[i].code;
psdtexturemap[stationlist[i].direction2.code] = stationlist[i].code; psdtexturemap[stationlist[i].direction2.code] = stationlist[i].code;
psdtexturemap[stationlist[i].direction1.name] = stationlist[i].code;
psdtexturemap[stationlist[i].direction2.name] = stationlist[i].code;
} }
} }
@ -298,6 +300,7 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
} }
if (data._type == "Psd") { if (data._type == "Psd") {
scope.modelmanager.standmodel.code = data.code; scope.modelmanager.standmodel.code = data.code;
scope.showmodel = scope.modelmanager.standmodel.mesh; scope.showmodel = scope.modelmanager.standmodel.mesh;
scope.scene.add(scope.showmodel); scope.scene.add(scope.showmodel);
@ -353,10 +356,22 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
if (data._type == "Psd") { if (data._type == "Psd") {
scope.showmodel = scope.modelmanager.standmodel.mesh; scope.showmodel = scope.modelmanager.standmodel.mesh;
scope.scene.add(scope.showmodel); scope.scene.add(scope.showmodel);
if(data.standCode == undefined){
if(psdtexturemap[data.code]){
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.code]];
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
}else{
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture["Station18398"];
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
}
}
if(scope.stationtexture[psdtexturemap[data.standCode]]){ if(scope.stationtexture[psdtexturemap[data.standCode]]){
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.standCode]]; scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.standCode]];
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true; scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
} }
} }

View File

@ -36,7 +36,7 @@ export default {
// height: document.documentElement.clientHeight - 80 // height: document.documentElement.clientHeight - 80
// }, // },
maskOpen: false, maskOpen: false,
maskWidth: '100%', maskWidth: 'calc(100% - 450px)',
disPlay: false disPlay: false
}; };
}, },