修改三维设备贴图配置bug
This commit is contained in:
parent
2e40e63e9f
commit
87c52581f2
@ -143,20 +143,18 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
|
|||||||
|
|
||||||
this.modelmanager = new ModelManager();
|
this.modelmanager = new ModelManager();
|
||||||
getPublish3dMapDetail(skinCode).then(netdata => {
|
getPublish3dMapDetail(skinCode).then(netdata => {
|
||||||
console.log(JSON.parse(netdata.data.stands));
|
|
||||||
setpsdstationmap(JSON.parse(netdata.data.stands));
|
setpsdstationmap(JSON.parse(netdata.data.stands));
|
||||||
Standtextureload(scope,JSON.parse(netdata.data.assets));
|
Standtextureload(scope,JSON.parse(netdata.data.assets));
|
||||||
console.log(scope.stationtexture);
|
|
||||||
scope.modelmanager.loadpromise(Staticmodel, scope.mixers).then(function (data) {
|
scope.modelmanager.loadpromise(Staticmodel, scope.mixers).then(function (data) {
|
||||||
moveanima.initlistnew(scope.modelmanager.switchmodel.mesh);
|
moveanima.initlistnew(scope.modelmanager.switchmodel.mesh);
|
||||||
daochamodel = scope.modelmanager.switchmodel.mesh.getObjectByName("DAOCHA");
|
daochamodel = scope.modelmanager.switchmodel.mesh.getObjectByName("DAOCHA");
|
||||||
scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map =scope.stationtexture["stationlist"];
|
scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map =scope.stationtexture["stationlist"];
|
||||||
scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map.needsUpdate = true;
|
scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map.needsUpdate = true;
|
||||||
|
|
||||||
scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map =scope.stationtexture["pingbimen"];
|
scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map =scope.stationtexture["pingbimen"];
|
||||||
scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map.needsUpdate = true;
|
scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map.needsUpdate = true;
|
||||||
|
|
||||||
console.log(scope.modelmanager);
|
|
||||||
// scope.stationtexture
|
|
||||||
animate();
|
animate();
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
@ -34,8 +34,8 @@ export function Standtextureload(jlmap3dedit,assettype){
|
|||||||
}
|
}
|
||||||
if(assettype.stationtexture == "haerbin1"){
|
if(assettype.stationtexture == "haerbin1"){
|
||||||
if(jlmap3dedit.stationtexture){
|
if(jlmap3dedit.stationtexture){
|
||||||
setstationtexture(jlmap3dedit.stationtexture,"stationlist",'../../static/texture/xian3/devicelist.jpg');
|
setstationtexture(jlmap3dedit.stationtexture,"stationlist",'../../static/texture/heb/devicelist.jpg');
|
||||||
setstationtexture(jlmap3dedit.stationtexture,"pingbimen",'../../static/texture/xian3/pingbimen.jpg');
|
setstationtexture(jlmap3dedit.stationtexture,"pingbimen",'../../static/texture/heb/pingbimen.png');
|
||||||
|
|
||||||
setstationtexture(jlmap3dedit.stationtexture,"Station5361",'../../static/texture/heb/Station5361.jpg');
|
setstationtexture(jlmap3dedit.stationtexture,"Station5361",'../../static/texture/heb/Station5361.jpg');
|
||||||
setstationtexture(jlmap3dedit.stationtexture,"Station11094",'../../static/texture/heb/Station11094.jpg');
|
setstationtexture(jlmap3dedit.stationtexture,"Station11094",'../../static/texture/heb/Station11094.jpg');
|
||||||
@ -91,7 +91,6 @@ function settexture(materiallist,name,textureurl){
|
|||||||
}
|
}
|
||||||
function setstationtexture(stationtexture,name,textureurl){
|
function setstationtexture(stationtexture,name,textureurl){
|
||||||
var loader = new THREE.TextureLoader();
|
var loader = new THREE.TextureLoader();
|
||||||
|
|
||||||
// 加载一个资源
|
// 加载一个资源
|
||||||
loader.load(
|
loader.load(
|
||||||
// 资源URL
|
// 资源URL
|
||||||
|
Loading…
Reference in New Issue
Block a user