diff --git a/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js b/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js index bf206288d..0368a69a9 100644 --- a/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js +++ b/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js @@ -449,6 +449,7 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) { } } + let switchActionMode = true; this.changeAnimate = function(type){ // @@ -497,19 +498,26 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) { scope.camera.position.y =9.94; scope.camera.position.z = -3.41; scope.controls.target = new THREE.Vector3(-3.81,5.59,-3.41); - - // scope.modelmanager.staticswitchmodel.action["5jiasuo"].reset(); - // scope.modelmanager.staticswitchmodel.action.reset(); - scope.modelmanager.staticswitchmodel.action.time = 6.03; - stopTime = 9.33; - scope.modelmanager.staticswitchmodel.action.play(); - setTimeout(function(){ - scope.modelmanager.staticswitchmodel.action.reset(); + if(switchActionMode == true){ + switchActionMode = false; + scope.modelmanager.staticswitchmodel.action.time = 6.03; + stopTime = 9.33; + scope.modelmanager.staticswitchmodel.action.play(); + }else{ + switchActionMode = true; scope.modelmanager.staticswitchmodel.action.time = 20.03; stopTime = 23.33; scope.modelmanager.staticswitchmodel.action.play(); - }, 4000); + } + // scope.modelmanager.staticswitchmodel.action["5jiasuo"].reset(); + // + // scope.modelmanager.staticswitchmodel.action.reset(); + // + // setTimeout(function(){ + // scope.modelmanager.staticswitchmodel.action.reset(); + // + // }, 4000); } if(type == "action4"){ scope.camera.position.x = -0.03;