Browse Source

Merge branch 'master' of http://192.168.0.115:3000/chenzhiguang/guangdong_museum

tremble 4 years ago
parent
commit
143fed323c
1 changed files with 33 additions and 6 deletions
  1. 33 6
      web/public/static/js/main_2020_show.js

+ 33 - 6
web/public/static/js/main_2020_show.js

@@ -11,6 +11,8 @@ window.transitions = null
 window.browser = null
 window.browser = null
 window.momentTourBlackNewType = 0//true
 window.momentTourBlackNewType = 0//true
 
 
+ 
+
 g_playAudio = null
 g_playAudio = null
 
 
 g_tourAudio = new Audio 
 g_tourAudio = new Audio 
@@ -60,7 +62,7 @@ var initMenuSanda = ()=>{
     for(var i=0;i<3;i++){
     for(var i=0;i<3;i++){
         var plane = new THREE.Mesh(geo, new THREE.MeshBasicMaterial({
         var plane = new THREE.Mesh(geo, new THREE.MeshBasicMaterial({
             transparent:true,
             transparent:true,
-            
+            depthTest:false,
         })) 
         })) 
         menuSanda.buttons.push(plane)
         menuSanda.buttons.push(plane)
         menuSanda.add(plane)
         menuSanda.add(plane)
@@ -18343,7 +18345,7 @@ window.Modernizr = function(n, e, t) {
                         
                         
                     }else if(info.sid == "1626863308658"){
                     }else if(info.sid == "1626863308658"){
                         menuSanda = overlay
                         menuSanda = overlay
-                        
+                        overlay.plane.material.depthTest = false
                         initMenuSanda()
                         initMenuSanda()
                     }else if(info.sid == "1626933767157"){//下一张
                     }else if(info.sid == "1626933767157"){//下一张
                         rightBtn = overlay 
                         rightBtn = overlay 
@@ -18386,7 +18388,8 @@ window.Modernizr = function(n, e, t) {
                 c = player.overlayGroup.children.find(e=>e.sid == '1626743604266') 
                 c = player.overlayGroup.children.find(e=>e.sid == '1626743604266') 
                 d = player.overlayGroup.children.find(e=>e.sid == '1626743691935') 
                 d = player.overlayGroup.children.find(e=>e.sid == '1626743691935') 
                 d.plane.material = c.plane.material;//同步视频
                 d.plane.material = c.plane.material;//同步视频
-                var main = player.overlayGroup.children.find(e=>e.sid == "1626743467424") 
+                var main = player.overlayGroup.children.find(e=>e.sid == "1626743467424")
+                main.plane.material.depthTest = false                
                 c.plane.material.map.image.loop = false 
                 c.plane.material.map.image.loop = false 
                 main.plane.material.map.image.loop = false 
                 main.plane.material.map.image.loop = false 
                 main.plane.material.map.image.addEventListener('ended', ()=>{ //同步播
                 main.plane.material.map.image.addEventListener('ended', ()=>{ //同步播
@@ -23396,10 +23399,32 @@ window.Modernizr = function(n, e, t) {
 				}
 				}
                 
                 
                 //this.overlayGroup && (t = t.concat(this.overlayGroup.children.filter(e=>e.overlayType == "video"))); 
                 //this.overlayGroup && (t = t.concat(this.overlayGroup.children.filter(e=>e.overlayType == "video"))); 
-                this.overlayGroup && (t = t.concat(this.overlayGroup.children.filter(e=>e.overlayType != "video"))); 
+                //this.overlayGroup && (t = t.concat(this.overlayGroup.children.filter(e=>e.overlayType != "video"))); 
                 
                 
+                 
+                 
                 var i = new r.Vector3(e.x,e.y,-1).unproject(this.camera);
                 var i = new r.Vector3(e.x,e.y,-1).unproject(this.camera);
                 this.raycaster.set(i, this.getMouseDirection(e)); 
                 this.raycaster.set(i, this.getMouseDirection(e)); 
+                
+                
+                if(this.overlayGroup){
+                    let planes = this.overlayGroup.children.filter(e=>e.overlayType != "video")
+                    let n = this.raycaster.intersectObjects(planes, true)
+                    
+                    
+                    if(n && n.length){
+                        let a = this.hoverOverlay( n[0].object)
+                        
+                        if(a){
+                             $("#player").css("cursor","pointer");	
+                             return;
+                        }
+                    }
+                    
+                }
+                
+                
+                
                 var n = this.raycaster.intersectObjects(t, true);//add true
                 var n = this.raycaster.intersectObjects(t, true);//add true
                 // n[0] && console.log(n[0].point);
                 // n[0] && console.log(n[0].point);
                 if(g_HotStatus=="add"){
                 if(g_HotStatus=="add"){
@@ -23424,9 +23449,11 @@ window.Modernizr = function(n, e, t) {
                 
                 
 				this.intersectHot = null;
 				this.intersectHot = null;
                 
                 
-                var intersect = this.hoverOverlay(this.overlayGroup && o && o.object.parent.parent == this.overlayGroup && o.object)
                 
                 
-				if( !intersect &&  g_HotStatus!="add") $("#player").css("cursor","");	
+                
+                //var intersect = this.hoverOverlay(this.overlayGroup && o && o.object.parent.parent == this.overlayGroup && o.object)
+                
+				if( /* !intersect &&   */g_HotStatus!="add") $("#player").css("cursor","");	
                 if (o.face) {
                 if (o.face) {
                     o.normal = o.face.normal.applyQuaternion(o.object.quaternion);
                     o.normal = o.face.normal.applyQuaternion(o.object.quaternion);
                     var a = this.position.clone().sub(o.point);
                     var a = this.position.clone().sub(o.point);