|
@@ -1162,7 +1162,7 @@ function initByTHREE(THREE){
|
|
|
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ let labels = []
|
|
|
|
|
|
|
|
|
|
|
@@ -1193,7 +1193,7 @@ function initByTHREE(THREE){
|
|
|
this.visible = true
|
|
|
this.shelterByModel = o.shelterByModel
|
|
|
this.floorIndex = o.floorIndex
|
|
|
-
|
|
|
+ labels.push(this)
|
|
|
|
|
|
if(window.player.model){
|
|
|
this.init()
|
|
@@ -1349,7 +1349,27 @@ function initByTHREE(THREE){
|
|
|
}
|
|
|
|
|
|
})
|
|
|
+
|
|
|
+
|
|
|
+ player.on("view.changed",(e)=>{
|
|
|
+ if(e.cameraChanged){
|
|
|
+ //if(needUpdateZIndex){
|
|
|
+ let label_ = labels.filter(e=>e.elem[0].style.display == 'block')
|
|
|
+ label_.sort((a,b)=>b.pos2d.z - a.pos2d.z)
|
|
|
+ label_.forEach((e,index)=>e.elem.css('z-index', index+1000));
|
|
|
+
|
|
|
+ //}
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
})
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|