From 937fc4b1f9bab231007224dbfad3f4f86e34c5df Mon Sep 17 00:00:00 2001 From: sunzhenyu Date: Fri, 3 Jul 2020 17:24:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=80=9A=E5=8F=B7=E4=B8=89?= =?UTF-8?q?=E7=BB=B4=E9=87=8D=E5=A4=8D=E6=98=BE=E7=A4=BA=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E9=97=B4bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jlmap3d/jl3dmaintainer/Jl3dfaultdevice.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/jlmap3d/jl3dmaintainer/Jl3dfaultdevice.js b/src/jlmap3d/jl3dmaintainer/Jl3dfaultdevice.js index 983280d8b..7708128fc 100644 --- a/src/jlmap3d/jl3dmaintainer/Jl3dfaultdevice.js +++ b/src/jlmap3d/jl3dmaintainer/Jl3dfaultdevice.js @@ -200,6 +200,7 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) { if (data.type == "room") { scope.resetmodel(); scope.showmodel = scope.modelmanager.roommodel.mesh; + scope.showmodel.code = data.code; scope.scene.add(scope.showmodel); scope.camera.position.set(5, 7, -9); scope.controls.target = new THREE.Vector3(4, 6, -8); @@ -366,11 +367,12 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) { }; this.resetmodel = function(){ - if(scope.nowobject.animacode){ - scope.animastats = false; - moveanima.setplaylist(moveanima.animatelist[scope.nowobject.animacode+"fuwei"],true); + if(scope.nowobject){ + if(scope.nowobject.animacode){ + scope.animastats = false; + moveanima.setplaylist(moveanima.animatelist[scope.nowobject.animacode+"fuwei"],true); + } } - }; this.animationmsgshowon = function(nowobject){