xzw 4 年之前
父節點
當前提交
baff91ba6a

+ 2 - 0
edit-backstage/js/edit.js

@@ -3049,10 +3049,12 @@ var EditOverlay = {
     },
 
     addPlane: function(o) {
+        if(!o.intersect)return;
         var pos = o.intersect.point;
         var overlay = new Overlay({
             sid: new Date().getTime() + ""
         })
+        overlay.hasRequestLoad = true
         overlay.position.copy(pos);
         if (player.getMouseDirection().angleTo(o.intersect.face.normal) < Math.PI / 2) {
             overlay.lookAt(o.intersect.face.normal.clone().negate().add(pos));

+ 1 - 0
edit-backstage/js/overlay.js

@@ -258,6 +258,7 @@ var initOverlay = function(THREE){
     }
     Overlay.prototype.updateVisibles = function(panos){ 
         this.visible = !!panos.find(pano=>this.visiblePanos.includes(pano))
+        if(!this.visible && this.overlayType == 'video') this.plane.material.map.image.pause()
     }    
     Overlay.updateVisibles = function(panos){
         if(panos === true){

二進制
web/public/static/images/video831.mp4


+ 1 - 1
web/public/static/js/main_2020_show.js

@@ -22119,7 +22119,7 @@ window.Modernizr = function(n, e, t) {
                 }
                 if( this.overlayGroup.children.length){
                     this.overlayGroup.children.forEach((overlay)=>{
-                        overlay.overlayType == "video" /* && overlay.inSight */&&  overlay.plane.material.map.image.play()
+                        overlay.overlayType == "video"  && overlay.visible  &&  overlay.plane.material.map.image.play()
                     })
                     //this.overlayInitedPlay = true
                 }

+ 1 - 0
web/public/static/js/overlay.js

@@ -258,6 +258,7 @@ var initOverlay = function(THREE){
     }
     Overlay.prototype.updateVisibles = function(panos){ 
         this.visible = !!panos.find(pano=>this.visiblePanos.includes(pano))
+        if(!this.visible && this.overlayType == 'video') this.plane.material.map.image.pause()
     }    
     Overlay.updateVisibles = function(panos){
         if(panos === true){

+ 1 - 1
web/src/views/gui/newguide.vue

@@ -129,7 +129,7 @@ export default {
       this.swiper[type]()
     },
     gotoLight(item){
-      player.director.goToHighlight(this.hoverIdx)
+      player.director.goToHighlight([this.hoverIdx,0])
     },
     hoverHandle(item,i){
       this.hoverIdx = i;