ソースを参照

css写的div版本

xzw 4 年 前
コミット
a01784f4fb
2 ファイル変更18 行追加5 行削除
  1. 4 4
      web/public/static/js/main_2020_show.js
  2. 14 1
      web/public/static/js/overlay.js

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

@@ -58906,13 +58906,13 @@ function initTransitionPass(THREE){
                     element.style.WebkitTransform = style;
                     element.style.transform = style;
                          
-                    if(browser.isMobile() && browser.detectIOS()){
+                    /* if(browser.isMobile() && browser.detectIOS()){
                         var info = menuDiv.objects.find(info=>info.id == element.id);
                         if(info && info.transform){
                             $(element).css("transform",  info.transform )
                             $(element).css("WebkitTransform",  info.transform )
                         }  
-                    }
+                    } */
 
                     var objectData = { style: style };
 
@@ -59022,8 +59022,8 @@ function initTransitionPass(THREE){
             }
 
             var cameraCSSMatrix = camera.type == "OrthographicCamera"  /* camera.isOrthographicCamera */ ?
-                'scale(' + fov + ')' + 'translate(' + epsilon( tx ) + 'px,' + epsilon( ty ) + 'px)' + getCameraCSSMatrix( camera.matrixWorldInverse ) :
-                'translateZ(' + fov + 'px)' + getCameraCSSMatrix( camera.matrixWorldInverse );
+                'scale(' + fov + ')' + 'translate(' + epsilon( tx ) + 'px,' + epsilon( ty ) + 'px) ' + getCameraCSSMatrix( camera.matrixWorldInverse ) :
+                'translateZ(' + fov + 'px) ' + getCameraCSSMatrix( camera.matrixWorldInverse );
 
             var style = cameraCSSMatrix +
                 'translate(' + _widthHalf + 'px,' + _heightHalf + 'px)';

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

@@ -113,7 +113,7 @@ var initOverlay = function(THREE) {
         var plane = this.plane;
         this.transformAtPanos = info.transformAtPanos || {}
         //在每个漫游点独立设置的position。  
-        var curPanoTransform = player.currentPano && this.transformAtPanos[player.currentPano.id] || {}
+        var curPanoTransform = this.transformAtPanos[this.getTransformSid()] || {}
 
         info.depth && this.scale.setZ(info.depth / settings.overlay.depth)
 
@@ -171,6 +171,19 @@ var initOverlay = function(THREE) {
 
     }
 
+
+    Overlay.prototype.getTransformSid = function(){
+        var name
+        if(player.mode == 'panorama'){
+            name = player.currentPano ? player.currentPano.id : 'outside'
+        }else{
+            name = 'outside'
+        }
+        return name
+    } 
+
+
+
     Overlay.prototype.addBox = function(state) {
         if (state == !!this.hasBox) {
             return;