xzw hace 8 meses
padre
commit
ec44d95f68
Se han modificado 2 ficheros con 8 adiciones y 2 borrados
  1. 2 0
      scene/public/static/js/main_2020_show.js
  2. 6 2
      scene/public/static/js/manage.js

+ 2 - 0
scene/public/static/js/main_2020_show.js

@@ -18824,10 +18824,12 @@ window.Modernizr = function(n, e, t) {
             n.prototype.showHighMap  = function() {
                 if (!this.highMapCube) return
                 this.highMapCube.visible = true
+                this.dispatchEvent({type:'highMapCubeShow',state:true})
             }
             n.prototype.hideHighMap  = function() {
                 if (!this.highMapCube) return
                 this.highMapCube.visible = false
+                this.dispatchEvent({type:'highMapCubeShow',state:false})
             }
             //缩小后继续显示cube呢还是不显示?  不显示的话,就要把cube上的复制到renderTarget上……会不会又崩溃,or没加载的显示???
 

+ 6 - 2
scene/public/static/js/manage.js

@@ -2176,6 +2176,7 @@ function initByTHREE(THREE){
             side:2,
             opacity: arrowInfo.maxOpa,
             depthWrite:false, //防止和导览路线重叠闪烁
+            depthTest:  !player.model.highMapCube.visible
         }) 
         let mats = {
             default: arrowMat,
@@ -2188,13 +2189,16 @@ function initByTHREE(THREE){
         let arrows = new THREE.Object3D; arrows.name = 'groundArrows'
           
         player.model.add(arrows)
-
+        player.model.addEventListener('highMapCubeShow',(e)=>{
+            //arrows.children.forEach(a=>a.material.depthTest = !e.state)
+            mats.default.depthTest = mats.fadeIn.depthTest = !player.model.highMapCube.visible
+        })  
         
         var createArrow = function(mat){
           
             var arrow = new THREE.Mesh(plane, mat)
             arrow.name = 'arrow'
-            
+            arrow.renderOrder = 3
             let s = 0.15
             arrow.scale.set(s,s,s)