xzw 1 năm trước cách đây
mục cha
commit
af98fe2247
1 tập tin đã thay đổi với 12 bổ sung10 xóa
  1. 12 10
      src/custom/modules/panos/Images360.js

+ 12 - 10
src/custom/modules/panos/Images360.js

@@ -2055,16 +2055,18 @@ export class Images360 extends THREE.EventDispatcher{
             })
             
             viewer.addEventListener('camera_changed',(e)=>{ 
-                //重新获取visibleTiles
-                Common.intervalTool.isWaiting(
-                    'update4kTiles',
-                    () => {
-                        console.log('update4kTiles')
-                        let vectorForward = this.getDirection()
-                        this.updateTiles(vectorForward)
-                    },
-                    500
-                ) 
+                if(e.viewport == viewer.mainViewport){
+                    //重新获取visibleTiles
+                    Common.intervalTool.isWaiting(
+                        'update4kTiles',
+                        () => {
+                            console.log('update4kTiles')
+                            let vectorForward = this.getDirection()
+                            this.updateTiles(vectorForward)
+                        },
+                        500
+                    ) 
+                }
             })  
         }