|
@@ -159,6 +159,10 @@ var clickMenuBtn = function(btn){
|
|
if(e != btn){
|
|
if(e != btn){
|
|
e.visible = false
|
|
e.visible = false
|
|
}else{
|
|
}else{
|
|
|
|
+ if(SandaPlayingIndex == i){
|
|
|
|
+ menuSanda.dontTouchWarn.visible = true
|
|
|
|
+ return
|
|
|
|
+ }
|
|
SandaPlayingIndex = i
|
|
SandaPlayingIndex = i
|
|
switchVideoSrc("static/videos/" + videoSrcs[i])
|
|
switchVideoSrc("static/videos/" + videoSrcs[i])
|
|
}
|
|
}
|
|
@@ -169,10 +173,9 @@ var clickMenuBtn = function(btn){
|
|
|
|
|
|
var checkMenuClick = function(){
|
|
var checkMenuClick = function(){
|
|
if(!menuSanda.opened && player.mode == 'panorama')return
|
|
if(!menuSanda.opened && player.mode == 'panorama')return
|
|
- if(SandaPlayingIndex != void 0 ){
|
|
|
|
- menuSanda.dontTouchWarn.visible = true
|
|
|
|
|
|
+ if(SandaPlayingIndex != void 0 && menuSanda.dontTouchWarn.visible){
|
|
|
|
+ return
|
|
}
|
|
}
|
|
-
|
|
|
|
var intersect = player.getMouseIntersect(null, menuSanda.buttons.slice())
|
|
var intersect = player.getMouseIntersect(null, menuSanda.buttons.slice())
|
|
if(!intersect)return
|
|
if(!intersect)return
|
|
var item = menuSanda.buttons.find(e=>e==intersect.object)
|
|
var item = menuSanda.buttons.find(e=>e==intersect.object)
|
|
@@ -490,13 +493,10 @@ var convertTool = {
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
|
|
- ifShelter: function(pos3d, pos2d){//检测某点在视线中是否被mesh遮挡
|
|
|
|
- if(!pos2d) pos2d = this.getPos2d(pos3d);
|
|
|
|
- var player = player;
|
|
|
|
- var ori = new THREE.Vector3(pos2d.x, pos2d.y, -1).unproject(player.camera); //找到视线原点
|
|
|
|
- var dir = pos3d.clone().sub(ori).normalize();
|
|
|
|
- ray.set(ori, dir)//由外向里 因为模型从内侧是可见的所以从外侧
|
|
|
|
-
|
|
|
|
|
|
+ ifShelter: function(pos3d){//检测某点在视线中是否被mesh遮挡
|
|
|
|
+ var ori = player.position
|
|
|
|
+ var dir = pos3d.clone().sub(ori).normalize()
|
|
|
|
+ var ray = new THREE.Raycaster(ori, dir) //由外向里 因为模型从内侧是可见的所以从外侧
|
|
|
|
|
|
/* if(config.isEdit && publicObjectSet.editor.mainDesign.editing){
|
|
/* if(config.isEdit && publicObjectSet.editor.mainDesign.editing){
|
|
var o = ray.intersectObjects(publicObjectSet.editor.mainDesign.wallMeshes);
|
|
var o = ray.intersectObjects(publicObjectSet.editor.mainDesign.wallMeshes);
|