From 87c52581f2e485aa4aaa0ea4fc39d68243607af4 Mon Sep 17 00:00:00 2001 From: sunzhenyu Date: Fri, 22 May 2020 09:32:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=89=E7=BB=B4=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E8=B4=B4=E5=9B=BE=E9=85=8D=E7=BD=AEbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jlmap3d/jl3ddevice/jl3ddeviceNew.js | 6 ++---- src/jlmap3d/jl3ddevice/standtextureload.js | 5 ++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js b/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js index cd4ad75f9..afb5308b6 100644 --- a/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js +++ b/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js @@ -143,20 +143,18 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) { this.modelmanager = new ModelManager(); getPublish3dMapDetail(skinCode).then(netdata => { - console.log(JSON.parse(netdata.data.stands)); setpsdstationmap(JSON.parse(netdata.data.stands)); Standtextureload(scope,JSON.parse(netdata.data.assets)); - console.log(scope.stationtexture); scope.modelmanager.loadpromise(Staticmodel, scope.mixers).then(function (data) { moveanima.initlistnew(scope.modelmanager.switchmodel.mesh); 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.needsUpdate = true; + scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map =scope.stationtexture["pingbimen"]; scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map.needsUpdate = true; - console.log(scope.modelmanager); - // scope.stationtexture + animate(); }) }); diff --git a/src/jlmap3d/jl3ddevice/standtextureload.js b/src/jlmap3d/jl3ddevice/standtextureload.js index 794b094ed..c72c5a133 100644 --- a/src/jlmap3d/jl3ddevice/standtextureload.js +++ b/src/jlmap3d/jl3ddevice/standtextureload.js @@ -34,8 +34,8 @@ export function Standtextureload(jlmap3dedit,assettype){ } if(assettype.stationtexture == "haerbin1"){ if(jlmap3dedit.stationtexture){ - setstationtexture(jlmap3dedit.stationtexture,"stationlist",'../../static/texture/xian3/devicelist.jpg'); - setstationtexture(jlmap3dedit.stationtexture,"pingbimen",'../../static/texture/xian3/pingbimen.jpg'); + setstationtexture(jlmap3dedit.stationtexture,"stationlist",'../../static/texture/heb/devicelist.jpg'); + setstationtexture(jlmap3dedit.stationtexture,"pingbimen",'../../static/texture/heb/pingbimen.png'); setstationtexture(jlmap3dedit.stationtexture,"Station5361",'../../static/texture/heb/Station5361.jpg'); setstationtexture(jlmap3dedit.stationtexture,"Station11094",'../../static/texture/heb/Station11094.jpg'); @@ -91,7 +91,6 @@ function settexture(materiallist,name,textureurl){ } function setstationtexture(stationtexture,name,textureurl){ var loader = new THREE.TextureLoader(); - // 加载一个资源 loader.load( // 资源URL