xzw 2 gadi atpakaļ
vecāks
revīzija
754b60a385
4 mainītis faili ar 396 papildinājumiem un 104 dzēšanām
  1. 78 50
      js/Hot.js
  2. 140 24
      js/main_2020_edit.js
  3. 154 24
      js/main_2020_show.js
  4. 24 6
      js/manage.js

+ 78 - 50
js/Hot.js

@@ -342,7 +342,7 @@ window.initHot = function(model){
                   
                 video.oncanplaythrough = (e)=> {
                     if(this.texMedia == video){ 
-                        /* if(video.paused) */console.log({str:'oncanplaythrough '+this.sid, level:1})
+                        /* if(video.paused) *///console.log({str:'oncanplaythrough '+this.sid, level:1})
                         //this.material_.map.needsUpdate = !0   //当初为何加这句?
                         //this.update(player)  
                     } 
@@ -757,6 +757,15 @@ window.initHot = function(model){
             } 
         }
         
+        getBoundOri(){
+            let bound
+            if(this.objObject){
+                bound = new THREE.Box3().copy(this.info.modelBound.bound) 
+            }else{
+                bound = planeBound.clone() 
+            } 
+            return bound
+        }            
         
         getCornerPoint(){//获取在每个漫游点上的视觉边界点  可以打开boxHelper和addBall来观测是否准确
             if(this.cornerPoints[player.currentPano.id]){
@@ -930,12 +939,24 @@ window.initHot = function(model){
                     
                 }
                  
-            }else{//飞出要判断模型阻挡,有点耗时就算了
-                return playVideoWhenFlyOut//true
+            }else{//飞出 只判断在不在画面内
+                //return playVideoWhenFlyOut//true 
+                let frustumMatrix = new THREE.Matrix4
+                frustumMatrix.multiplyMatrices(player.camera.projectionMatrix, player.camera.matrixWorldInverse)
+         
+                let frustum = new THREE.Frustum();
+                frustum.setFromMatrix(frustumMatrix)
+                
+                let bound = this.getBoundOri() 
+                bound.applyMatrix4(this.matrixWorld)
+                return frustum.intersectsBox(bound)  
             }
-        }
                 
                 
+            
+        }
+
+                
                 
         update(player){  
               
@@ -1406,12 +1427,7 @@ window.initHot = function(model){
                 if(boxHelper){
                     this.mesh.boxHelper = boxHelper
                 }else{  
-                    var bound 
-                    if(this.objObject){
-                        bound = new THREE.Box3().copy(this.info.modelBound.bound) 
-                    }else{
-                        bound = planeBound 
-                    } 
+                    var bound = this.getBoundOri() 
                     bound.expandByVector(new THREE.Vector3(0.0001,0.0001,0.0001))
                     this.mesh.boxHelper = new THREE.Box3Helper( bound,  new THREE.Color( "#00ffff"));
                     this.mesh.add(this.mesh.boxHelper) 
@@ -1570,7 +1586,7 @@ window.initHot = function(model){
 
     }
     
-    Hot.updateVisibles = function(panos) {
+    Hot.updateVisibles = function(panos) { //只显示没被遮挡的,否则会卡
         if (panos === true) {
             model.hotGroup.children.forEach(e=>e.updateVisible(null,true))
         } else {
@@ -1692,6 +1708,8 @@ window.initHot = function(model){
         }
         
         setTimeout(Hot.beginShineHot, 1000)
+        
+        player.emit('gotHotAndStartload')
     }
     window.Hot = Hot   
         
@@ -1789,14 +1807,27 @@ window.initHot = function(model){
         
     }
     
+    
+    
+    
+    
+    
+    
+    
+    
     Hot.updateHots = function(){ 
+    
         for(var i in player.model.hots){
             player.model.hots[i].update(player)
         }
         
-        if(player.mode != 'panorama' || !player.ready)return
+        if( !player.ready)return
         
+        this.needUpdate = true
         common.intervalTool.isWaiting('updateHots', ()=>{ //延时update,防止卡顿
+            if(!this.needUpdate)return
+            this.needUpdate = false
+            
             let videoCanPlay = [], aniCanPlay = [];
             for(var i in player.model.hots){
                  
@@ -1823,44 +1854,41 @@ window.initHot = function(model){
             let filter = (type,max,list,playFun)=>{
                 if(list.length < max){
                     list.forEach(hot=>type == 'video' ? hot.videoControl(true) : GifTexDeal.start(hot.animation))
-                }else{
-                    /* let r = common.sortByScore(list,[],[(hot)=>{
-                        let score = 0
-                        var cornerPointInfo = hot.getCornerPoint(); //仅支持漫游模式
-                        let pos2dSum = 0    //越接近0越接近屏幕中心
-                        for(let i=1,j=cornerPointInfo.cornerPoint.length;i<j;i++){//忽略第一个点,那是中心点
-                            var pos2d = math.getPos2d(cornerPointInfo.cornerPoint[i], player.camera, $("#player")[0])
-                            if(pos2d.trueSide){
-                                pos2dSum += Math.abs(pos2d.vector.x);
-                                pos2dSum += Math.abs(pos2d.vector.y);
-                            }else{
-                                pos2dSum += 30 - THREE.Math.clamp(Math.abs(pos2d.vector.x), 0, 5); //感觉决定背面的只有x,所以忽略y?  //这里无法确定加多少合适,是根据视频大小来的
-                            }  
-                        }
-                        
-                        //
-                        
-                        let area =   cornerPointInfo.diffLon * cornerPointInfo.diffLat * ( 8 / pos2dSum  )  //占据面积
-                        //score = -pos2dSum * (type == 'video' ? 100 : 10) + area  //gif的面积权重增加些,也就是不一定要靠近中心。因为一般而言gif比较小,起指示作用,即使散落在四角也尽量闪烁;而视频要观看的话一般会凑近居于中心
-                         
-                        score = area
-                        return score
-                    }]) */ 
-                    
-                    
+                }else{ 
                     let playerDir = player.getDirection()
-                    let r = common.sortByScore(list,[],[(hot)=>{    //方向因素
-                        var cornerPointInfo = hot.getCornerPoint(); 
+                    let request = []
+                    let planeDir = new Map()
+                    if(player.mode != 'panorama'){
+                        request.push((hot)=>{
+                            if(hot.plane){//考虑plane的方向,它甚至可能背对镜头
+                                let dir = new THREE.Vector3(0,0,-1).applyQuaternion(hot.quaternion)
+                                let angle = dir.dot(playerDir)
+                                planeDir.set(hot, angle)
+                                return angle > 0
+                            }else return true 
+                        })
+                    }
+                    let r = common.sortByScore(list,request,[(hot)=>{    //方向因素 
+                        var cornerPointInfo = hot.getCornerPoint(); //仅支持漫游模式
                         let dir = new THREE.Vector3().subVectors(hot.position, player.position).normalize()
-                       
-                        score = dir.dot(playerDir) * Math.pow(cornerPointInfo.diffLat,0.5)// pow降低高度的权重,因为宽度更重要些。之所以两个函数都乘以diffLat,也是为了防止在两个item的分数相同diffLon不同时,diffLat增长相同倍数却能造成分数差异的情况
-                         
+                        score = dir.dot(playerDir)
+                        player.mode == 'panorama' && (score *= Math.pow(cornerPointInfo.diffLat,0.5))// pow降低高度的权重,因为宽度更重要些。之所以两个函数都乘以diffLat,也是为了防止在两个item的分数相同diffLon不同时,diffLat增长相同倍数却能造成分数差异的情况
                         return score
                     },
-                    (hot)=>{//面积因素
-                        var cornerPointInfo = hot.getCornerPoint(); //仅支持漫游模式
-                        let area = cornerPointInfo.diffLon * Math.pow(cornerPointInfo.diffLat,0.5) / 1000 //占据面积
-                        return area
+                    (hot)=>{//面积因素 
+                        if(player.mode == 'panorama'){
+                            var cornerPointInfo = hot.getCornerPoint(); //仅支持漫游模式
+                            let area = cornerPointInfo.diffLon * Math.pow(cornerPointInfo.diffLat,0.5) / 1000 //占据面积
+                            return area
+                        }else{   
+                            let dis = player.position.distanceTo(hot.position); 
+                            let size = hot.getBoundOri().applyMatrix4(hot.matrixWorld).size(new THREE.Vector3).length() / 2 
+                            let score = Math.atan(size / Math.pow(dis,1.2)) * 50 // 在镜头中所占fov angle 的一半 。 pow是因为实际感受还是尽量显示近处的
+                            if(hot.plane){//考虑plane的方向,越倾斜分越低
+                                score *= planeDir.get(hot)  
+                            } 
+                            return score  
+                        }
                     } ])
                     //getCornerPoint仅支持漫游模式   Lat高度(纬度).
                     
@@ -1877,12 +1905,12 @@ window.initHot = function(model){
             }
             filter('video',playVideoMax, videoCanPlay);
             filter('animateInfo',playAniMax, aniCanPlay);
-        
-        
+            
+            //console.log('updateHots')
+            return true
             
              
-             
-        },  300) 
+        },  800) 
         
     }
     

+ 140 - 24
js/main_2020_edit.js

@@ -17254,8 +17254,46 @@ function o(a, s, l) {
                 i
             }
             ,
-            t.prototype.fadePanoMarkers = function(e, t) {
-                this.panos.fadeMarkerOpacity(e, t)
+            t.prototype.fadePanoMarkers = function(/* e, t */opacity, dur, o = {}) {//改
+               
+                if(window.DATA.hideFloorMarker)return
+                var currentPano =  player.currentPano
+                opacity = void 0 == opacity ? _settings.panorama.markerOpacity : opacity //不传opacity代表显示 
+
+                var hideWhenFlyOut = () => {
+                    var shows = [],
+                        hides = []
+                    player.model.panos.forEach(pano => {
+                         hides.push(pano)
+                    })
+                    this.panos.fadeMarkerOpacity(0, dur, [{ toOp: 0, member: hides }])
+                }
+
+                if (opacity == 0) {
+                    hideWhenFlyOut()
+                } else {
+                    if (player.mode == 'panorama' && currentPano) {
+                        var shows = [],  hides = []  
+
+                        player.model.panos.forEach(pano => { //是邻近点就显示否则隐藏 
+                            if (currentPano.neighbourPanos[pano.id]) { 
+                                shows.push(pano) 
+                            } else {
+                                hides.push(pano)
+                            }
+                        })
+                        this.panos.fadeMarkerOpacity(opacity, dur, [
+                            { toOp: opacity, member: shows },
+                            { toOp: 0, member: hides },
+                        ])
+                    } else if (player.modeTran.split('-')[1] != 'panorama') {
+                        //飞出后marker隐藏
+
+                        hideWhenFlyOut()
+                    }
+                }
+                
+                
             }
             ,
             t.prototype.setSweepVisibility = function(t) {
@@ -17874,22 +17912,43 @@ function o(a, s, l) {
                 this.skyboxMesh.updateMatrix(),
                 this.skyboxMesh.updateMatrixWorld(),
                 this.marker = null,
-                this.showFloorMarker = this.showFloorMarker =  !window.DATA.hideFloorMarker,
-                this.isAligned() && (this.marker = new s.Mesh(_,new s.MeshBasicMaterial({
-                    map: b,
-                    side: s.DoubleSide,
-                    opacity: 0,
-                    transparent: !0,
-                    depthWrite: !1  
-                })), 
-                this.marker.visible = this.showFloorMarker,  
-                this.marker.renderOrder = l.panoMarker,
-                this.marker.name = "marker",
-                (this.marker.pano = this).marker.layers.set(v.PANOMARKERS),
-                this.marker.updateMatrixWorld(),
-                a.colorMarkerOnLoad && this.on("load", function() {
-                    this.marker.material.color.set(65280)
-                })),
+                this.showFloorMarker = this.showFloorMarker =  !window.DATA.hideFloorMarker
+                
+                
+                if(this.isAligned() ){
+                    
+                    this.marker = new s.Mesh(_,new s.MeshBasicMaterial({
+                        map: b,
+                        side: s.DoubleSide,
+                        opacity: 0,
+                        transparent: !0,
+                        depthWrite: !1  
+                    })), 
+                    this.marker.visible = false  //改:先不显示,之后根据opacity显示
+                    
+                    this.marker.renderOrder = l.panoMarker,
+                    this.marker.name = "marker",
+                    (this.marker.pano = this).marker.layers.set(v.PANOMARKERS),
+                    this.marker.updateMatrixWorld()
+                    
+                    
+                    if(!window.DATA.hideFloorMarker){//xzw 
+                        let opa = this.marker.material.opacity
+                        Object.defineProperty(this.marker.material, 'opacity', {
+                            get: function () {
+                                return opa
+                            },
+                            set: (o)=>{
+                                opa = o 
+                                //if(o>0)console.log('o>0',this.pano.id)
+                                convertTool.updateVisible(this.marker, 'hideWhenZeroOpa', o != 0) 
+                            },
+                        })  
+                    }
+                    a.colorMarkerOnLoad && this.on("load", function() {
+                        this.marker.material.color.set(65280)
+                    })
+                }
                 this.debugColor = (new s.Color).setHSL(.06 + .53 * Math.random(), .8 + .2 * Math.random(), .5 + .2 * Math.random()),
                 this.floorPosition = i.puck ? i.puck.clone() : null,
                 this.tiled = n,
@@ -21813,6 +21872,7 @@ function o(a, s, l) {
                             //EditOverlay.updatePano()
                             editTool.hotpoint.updatePano()
                             Hot.updateVisibles([this.currentPano])
+                            this.model.fadePanoMarkers()//add
                         }
                         
                     }
@@ -22410,12 +22470,11 @@ function o(a, s, l) {
                     this.updateMarkerVisi();//add
                     //(this.mode == u.PANORAMA) && this.updateHotVisible()//add
                     
-                    if(this.mode == "panorama" ){
+                    
+                    if(this.mode == V.PANORAMA){
                         //EditOverlay.updatePano()
                         editTool.hotpoint.updatePano()
-                    }
-                    //this.mode == u.PANORAMA && this.transitionPos({type:"flyDone", this.currentPano})//add   
-                    if(this.mode == V.PANORAMA){ 
+                        this.model.fadePanoMarkers()                        
                         Hot.updateVisibles([this.currentPano])
                     }else{
                         Hot.updateVisibles(true)
@@ -25113,7 +25172,7 @@ function o(a, s, l) {
             },
             input: {
                 longTapThreshold: 200,
-                moveToleranceNDC: .08,
+                moveToleranceNDC: 0.01,//.08,
                 touchMoveThreshold: 25
             },
             help: {
@@ -28457,7 +28516,9 @@ function o(a, s, l) {
                     }
             }
             ),
-            t.prototype.fadeMarkerOpacity = function(e, t) {
+            
+            
+            /* t.prototype.fadeMarkerOpacity = function(e, t) {
                 var i = void 0 === e ? a.panorama.markerOpacity : e
                   , n = this.list.findIndex(function(e) {
                     return e.marker
@@ -28479,7 +28540,62 @@ function o(a, s, l) {
                         })
                     }
                 }
+            } */
+            
+            
+            t.prototype.fadeMarkerOpacity = function(e, t, gr) {
+                s.cancelById('fadeMarkerOpacity') 
+                var n = this.list.findIndex(function (e) {
+                    //why? 难道没有marker的pano吗   findeIndex:获取数组中函数返回值不为fasle的第一个元素索引位置
+                    return e.marker
+                })
+                if (n < 0) {
+                    //logger.info('marker findIndex<0')
+                    return
+                }
+                var group
+
+                var tran = function (list, index) {
+                    list.member = list.member.filter(function (m) {
+                        return m.marker && m.marker.material.opacity != list.toOp
+                    })
+                    s.trigger({
+                        func: function (e, t) {
+                            //e:0-1
+                            list.member.forEach(function (m) {
+                                var o = m.marker.oldOpacity
+                                var i = o + e * (list.toOp - o)
+                                m.marker && (m.marker.material.opacity = i)
+                            })
+                        }.bind(this),
+                        duration: void 0 == t ? a.markerOpacityTransitionTime : t,
+                        name: '_fpm_' + index,
+                        id: 'fadeMarkerOpacity',
+                    })
+                }
+                this.forEach(function (e) {
+                    //先记录旧的opacity
+                    e.marker && (e.marker.oldOpacity = e.marker.material.opacity)
+                })
+
+                group = gr
+                /* if (e > 0 && gr) {
+                    group = gr
+                } else {
+                    group = [
+                        {
+                            member: this.list,
+                            toOp: 0,
+                        },
+                    ]
+                } */
+
+                for (var i = 0; i < group.length; i++) {
+                    tran(group[i], i)
+                }
             }
+            
+            
             ,
             c.exports = t
         }

+ 154 - 24
js/main_2020_show.js

@@ -18312,8 +18312,50 @@ window.Modernizr = function(n, e, t) {
                 e
             }
             ,
-            n.prototype.fadePanoMarkers = function(e, t) {
-                this.panos.fadeMarkerOpacity(e, t)
+            n.prototype.fadePanoMarkers = function(/* e, t */opacity, dur, o = {}) {//改
+                //this.panos.fadeMarkerOpacity(e, t)
+                
+                if(window.DATA.hideFloorMarker)return
+                var currentPano =  player.currentPano
+                opacity = void 0 == opacity ? _settings.panorama.markerOpacity : opacity //不传opacity代表显示 
+
+                var hideWhenFlyOut = () => {
+                    var shows = [],
+                        hides = []
+                    player.model.panos.forEach(pano => {
+                         hides.push(pano)
+                    })
+                    this.panos.fadeMarkerOpacity(0, dur, [{ toOp: 0, member: hides }])
+                }
+
+                if (opacity == 0) {
+                    hideWhenFlyOut()
+                } else {
+                    if (player.mode == 'panorama' && currentPano) {
+                        var shows = [],  hides = []  
+
+                        player.model.panos.forEach(pano => { //是邻近点就显示否则隐藏 
+                            if (currentPano.neighbourPanos[pano.id]) { 
+                                shows.push(pano) 
+                            } else {
+                                hides.push(pano)
+                            }
+                        })
+                        this.panos.fadeMarkerOpacity(opacity, dur, [
+                            { toOp: opacity, member: shows },
+                            { toOp: 0, member: hides },
+                        ])
+                    } else if (player.modeTran.split('-')[1] != 'panorama') {
+                        //飞出后marker隐藏
+
+                        hideWhenFlyOut()
+                    }
+                }
+                
+                
+                
+                
+                
             }
             ,
             n.prototype.setSweepVisibility = function(e) {
@@ -19084,22 +19126,46 @@ window.Modernizr = function(n, e, t) {
                 this.skyboxMesh.updateMatrixWorld(),
                 this.marker = null,
                 this.showFloorMarker = !window.DATA.hideFloorMarker;
-                this.isAligned() && (this.marker = new r.Mesh(b,new r.MeshBasicMaterial({
-                    map: w,
-                    side: r.DoubleSide,
-                    opacity: 0,
-                    transparent: !0,
-                    depthWrite: !1 
-                })),
-                this.marker.visible = this.showFloorMarker,  
-                this.marker.renderOrder = s.panoMarker,
-                this.marker.name = "marker",
-                this.marker.pano = this,
-                this.marker.layers.set(v.PANOMARKERS),
-                this.marker.updateMatrixWorld(),
-                a.colorMarkerOnLoad && this.on("load", function() {
-                    this.marker.material.color.set(65280)
-                })),
+                
+                
+                if(this.isAligned() ){
+                    this.marker = new r.Mesh(b,new r.MeshBasicMaterial({
+                        map: w,
+                        side: r.DoubleSide,
+                        opacity: 0,
+                        transparent: !0,
+                        depthWrite: !1 
+                    })),
+                    this.marker.visible = false  //改:先不显示,之后根据opacity显示
+                    
+                    this.marker.renderOrder = s.panoMarker,
+                    this.marker.name = "marker",
+                    this.marker.pano = this,
+                    this.marker.layers.set(v.PANOMARKERS),
+                    this.marker.updateMatrixWorld()  
+                    
+                   
+                    if(!window.DATA.hideFloorMarker){//xzw  
+                        let opa = this.marker.material.opacity
+                        Object.defineProperty(this.marker.material, 'opacity', {
+                            get: function () {
+                                return opa
+                            },
+                            set: (o)=>{
+                                opa = o 
+                                
+                                convertTool.updateVisible(this.marker, 'hideWhenZeroOpa', o > 0) 
+                                //if(o==0)console.log('o==0',this.id,this.marker.visible)
+                                    
+                                //console.log(o,this.id,this.marker.visible)
+                                
+                            },
+                        })  
+                    }
+                    a.colorMarkerOnLoad && this.on("load", function() {
+                        this.marker.material.color.set(65280)
+                    })
+                }
                 this.debugColor = (new r.Color).setHSL(.06 + .53 * Math.random(), .8 + .2 * Math.random(), .5 + .2 * Math.random()),
                 this.floorPosition = i.puck ? i.puck.clone() : null,
                 this.tiled = n,
@@ -23229,7 +23295,7 @@ window.Modernizr = function(n, e, t) {
                                 this.model.floorLogos[1].visible = false;
                             }
                             
-                             
+                            this.model.fadePanoMarkers()//add
                             Hot.updateVisibles([this.currentPano])//add
                         }
                     }
@@ -23852,6 +23918,7 @@ window.Modernizr = function(n, e, t) {
                     
                     if(this.mode == u.PANORAMA){ 
                         Hot.updateVisibles([this.currentPano])
+                        this.model.fadePanoMarkers()
                     }else{ 
                         Hot.updateVisibles(true)
                         this.model.hotGroup.children.forEach(overlay=>{
@@ -26845,7 +26912,7 @@ window.Modernizr = function(n, e, t) {
             },
             input: {
                 longTapThreshold: 200,
-                moveToleranceNDC: .08,
+                moveToleranceNDC: 0.01,//.08,
                 touchMoveThreshold: 25
             },
             help: {
@@ -27714,11 +27781,20 @@ window.Modernizr = function(n, e, t) {
             this.maxBaseUploadsPerFrame = x,
             this.maxNonBaseUploadsPerFrame = T
         }
-        function c() {
+         function c() {
             this.uploadIntervalCancelled || (this.overlayTilesLoaded || !this.usingTileOverlay ? (b = !0,
-            this.updateUploadQueue(this.maxNonBaseUploadsPerFrame, this.maxBaseUploadsPerFrame),
+             this.updateUploadQueue(this.maxNonBaseUploadsPerFrame, this.maxBaseUploadsPerFrame),
             this.peekNextFromUploadQueue() ? this.refreshUploadInterval(w) : this.uploadInterval = null) : this.refreshUploadInterval(this.uploadIntervalDelay))
-        }
+        }   
+         /*  function c() {
+            this.uploadIntervalCancelled || (this.overlayTilesLoaded || !this.usingTileOverlay ? (b = !0,
+            this.updateUploadQueue(1, 2),
+            w = 18,
+            this.peekNextFromUploadQueue() ? this.refreshUploadInterval(w) : this.uploadInterval = null) : this.refreshUploadInterval(this.uploadIntervalDelay))
+        }   */
+        
+        
+        
         var h = e("three")
           , u = e("../exception/BasicException")
           , d = e("../settings")
@@ -30509,7 +30585,7 @@ window.Modernizr = function(n, e, t) {
                         }
                 }
             }(),
-            n.prototype.fadeMarkerOpacity = function(e, t) {
+            /* n.prototype.fadeMarkerOpacity = function(e, t) {
                 var i = void 0 === e ? a.panorama.markerOpacity : e
                   , n = this.list.findIndex(function(e) {
                     return e.marker
@@ -30531,6 +30607,60 @@ window.Modernizr = function(n, e, t) {
                         })
                     }
                 }
+            } */
+            n.prototype.fadeMarkerOpacity = function(e, t, gr) {
+                 
+                
+                d.cancelById('fadeMarkerOpacity')
+                
+                var n = this.list.findIndex(function (e) {
+                    //why? 难道没有marker的pano吗   findeIndex:获取数组中函数返回值不为fasle的第一个元素索引位置
+                    return e.marker
+                })
+                if (n < 0) {
+                    //logger.info('marker findIndex<0')
+                    return
+                }
+                var group
+
+                var tran = function (list, index) {
+                    list.member = list.member.filter(function (m) {
+                        return m.marker && m.marker.material.opacity != list.toOp
+                    })
+                    transitions.trigger({
+                        func: function (e, t) {
+                            //e:0-1
+                            list.member.forEach(function (m) {
+                                var o = m.marker.oldOpacity
+                                var i = o + e * (list.toOp - o)
+                                m.marker && (m.marker.material.opacity = i)
+                            })
+                        }.bind(this),
+                        duration: void 0 == t ? a.markerOpacityTransitionTime : t,
+                        name: '_fpm_' + index,
+                        id: 'fadeMarkerOpacity',
+                    })
+                }
+                this.forEach(function (e) {
+                    //先记录旧的opacity
+                    e.marker && (e.marker.oldOpacity = e.marker.material.opacity)
+                })
+
+                group = gr
+                /* if (e > 0 && gr) {
+                    group = gr
+                } else {
+                    group = [
+                        {
+                            member: this.list,
+                            toOp: 0,
+                        },
+                    ]
+                } */
+
+                for (var i = 0; i < group.length; i++) {
+                    tran(group[i], i)
+                }
             }
             ,
             t.exports = n

+ 24 - 6
js/manage.js

@@ -1577,14 +1577,15 @@ function initByTHREE(THREE){
                      
                  //} 
              } 
-        })  
-    }
+        }) 
+        
+        player.model.hotGroup.children.length ? logSth() : player.on('gotHotAndStartload',logSth)    
+    } 
     window.bus.addEventListener('playerAndModelReady',f) //player model currentPano都已有
-    
-    
-    
+     
     window.bus.dispatchEvent({type: 'THREE_inited'})
     
+     
 }
 
 
@@ -1980,8 +1981,25 @@ var CursorDeal = {
      
 }
 
+function logSth(){
+    let hotCount = player.model.hotGroup.children.length
+
+    let videoCount = player.model.hotGroup.children.filter(e=>e.texType == 'video').length
+    let photoCount = player.model.hotGroup.children.filter(e=>e.texType == 'photo').length
+    let shineCount = player.model.hotGroup.children.filter(e=>e.texType == 'shine').length
+    let aniCount = player.model.hotGroup.children.filter(e=>e.info.animateInfo).length
+    let objCount = player.model.hotGroup.children.filter(e=>e.objObject).length
+
+    let chunkLen = player.model.chunks.length
+    let vertexC = player.model.chunks.reduce(function(total, chunk ){return total+chunk.geometry.attributes.position.count}, 0) 
+
+    let panoCount = player.model.panos.list.length
+    Log(`共有chunk个数 ${chunkLen} ( 顶点数 ${vertexC} )
+    热点个数 ${hotCount} ( vedio ${videoCount} 个,photo ${photoCount} 个,shine ${shineCount}个。 gif ${aniCount} 个,obj ${objCount} 个
+    漫游点数 ${panoCount} 个)`, '#FF4399', 14)
+}
+
 
- 
 
 //兼容一代的場景
 //請求地址統一管理