浏览代码

Merge branch 'dev' of http://192.168.0.115:3000/bill/traffic-laser into dev

bill 2 年之前
父节点
当前提交
bd08e632d8
共有 4 个文件被更改,包括 45 次插入36 次删除
  1. 32 28
      public/static/lib/potree/potree.js
  2. 1 1
      public/static/lib/potree/potree.js.map
  3. 11 6
      src/assets/public.scss
  4. 1 1
      src/views/scene/index.vue

+ 32 - 28
public/static/lib/potree/potree.js

@@ -56235,7 +56235,7 @@
 	settings.isLocalhost = settings.prefix.includes('localhost');
 	settings.isLocalhost = settings.prefix.includes('localhost');
 	Potree.config = config$1;
 	Potree.config = config$1;
 	Potree.settings = settings;
 	Potree.settings = settings;
-	console.log('2023-1');
+	Potree.versionDate = '20231229-0';
 
 
 	var MathLight = {};
 	var MathLight = {};
 	MathLight.RADIANS_PER_DEGREE = Math.PI / 180;
 	MathLight.RADIANS_PER_DEGREE = Math.PI / 180;
@@ -96884,7 +96884,7 @@ ENDSEC
 	    }
 	    }
 	    
 	    
 	    changeImg(img, pano){
 	    changeImg(img, pano){
-	        
+	        console.warn('changeImg', pano.id);
 	        this.pano = pano;
 	        this.pano = pano;
 	        let item = this.imgDatas.find(p=>p.pano == pano); 
 	        let item = this.imgDatas.find(p=>p.pano == pano); 
 	        if(/* this.img == img ||  */item){
 	        if(/* this.img == img ||  */item){
@@ -96896,28 +96896,32 @@ ENDSEC
 	            //console.log('重复使用',item.pano.id)
 	            //console.log('重复使用',item.pano.id)
 	            return
 	            return
 	        }
 	        }
-	        
-	        viewer.addTimeMark('depthSampler','start');
-	        this.canvas.width = img.width; 
-	        this.canvas.height = img.height; 
-	        this.context.drawImage(img, 0, 0); 
-	        let data = this.context.getImageData(0, 0, img.width , img.height ).data;     //getImageData 1px时 : pc chrome 耗时0.01毫秒左右(排除第一次的50) , 但firefox: 4。但换贴图之后就多达5甚至几十  
-	        //console.log('changeImg',pano.id ) 
-	        //this.img = img
-	         
-	         
-	        if(this.imgDatas.length >= this.maxDataCount){
-	            let old = this.imgDatas.find(e=>!this.nearPanos.includes(e.pano));   
-	            //console.log('推出',old.pano.id)
-	            this.imgDatas.splice(this.imgDatas.indexOf(old), 1);//推出使用时间最早的一个非nearPano
-	        } 
-	        this.imgDatas.push({pano, data});
-	        
-	        
-	        
-	        this.dispatchEvent({type:'changeImg',pano});
-	        viewer.addTimeMark('depthSampler','end'); //耗时chrome 25ms,firefox: 38ms, iphoneX:33ms
-	        
+	        try{
+	            viewer.addTimeMark('depthSampler','start');
+	            this.canvas.width = img.width; 
+	            this.canvas.height = img.height; 
+	            this.context.drawImage(img, 0, 0); 
+	            let data = this.context.getImageData(0, 0, img.width , img.height ).data;     //getImageData 1px时 : pc chrome 耗时0.01毫秒左右(排除第一次的50) , 但firefox: 4。但换贴图之后就多达5甚至几十  
+	            //console.log('changeImg',pano.id ) 
+	            //this.img = img
+	             
+	             
+	            if(this.imgDatas.length >= this.maxDataCount){
+	                let old = this.imgDatas.find(e=>!this.nearPanos.includes(e.pano));   
+	                //console.log('推出',old.pano.id)
+	                this.imgDatas.splice(this.imgDatas.indexOf(old), 1);//推出使用时间最早的一个非nearPano
+	            } 
+	            this.imgDatas.push({pano, data});
+	            
+	            
+	            
+	            this.dispatchEvent({type:'changeImg',pano});
+	            viewer.addTimeMark('depthSampler','end'); //耗时chrome 25ms,firefox: 38ms, iphoneX:33ms
+	        }catch(e){
+	            console.error(e ); //内存不足  Failed to execute 'getImageData' on 'CanvasRenderingContext2D': Out of memory at ImageData creation
+	            return false
+	        }
+		        
 	        
 	        
 	        
 	        
 	         /* pano.depthData = {}
 	         /* pano.depthData = {}
@@ -98660,14 +98664,14 @@ ENDSEC
 	        let panos = [this.currentPano, ...nearPanos ];
 	        let panos = [this.currentPano, ...nearPanos ];
 	        this.depthSampler.updateNearPanos(panos);
 	        this.depthSampler.updateNearPanos(panos);
 	        
 	        
-	        let maxWaitDur = browser.isMobile() ? 40 : 60;  
-	        let changeCount = 0, getCount = 0;
+	        let maxWaitDur = browser.isMobile() ? 30 : 60;  
+	        let changeCount = 0, maxChangeTex = browser.isMobile() ? 2 : 4, getCount = 0;
 	        let changeTexCount = ()=>{
 	        let changeTexCount = ()=>{
 	            changeCount ++;
 	            changeCount ++;
-	        };
+	        }; 
 	        let median = Math.max(10, Potree.timeCollect.depthSampler.median); 
 	        let median = Math.max(10, Potree.timeCollect.depthSampler.median); 
 	        let ifOverTime = ()=>{ 
 	        let ifOverTime = ()=>{ 
-	            let is = changeCount * median  +  getCount * 0.01 > maxWaitDur;//不换贴图也要一丢丢计算时间 
+	            let is = changeCount >= maxChangeTex || changeCount * median  +  getCount * 0.01 > maxWaitDur;//不换贴图也要一丢丢计算时间 
 	            /* if(is){
 	            /* if(is){
 	                console.log(1)
 	                console.log(1)
 	            } */
 	            } */

文件差异内容过多而无法显示
+ 1 - 1
public/static/lib/potree/potree.js.map


+ 11 - 6
src/assets/public.scss

@@ -353,8 +353,8 @@ samp {
       background: #fff;
       background: #fff;
 
 
       .info-bottom>div {
       .info-bottom>div {
-        background: rgba(0, 0, 0, 0);
-        border    : 1px solid #CCCCCC;
+        background: #E6E9F0;
+        // border    : 1px solid #CCCCCC;
         color     : #000;
         color     : #000;
       }
       }
 
 
@@ -363,7 +363,8 @@ samp {
 
 
         .right-btn {
         .right-btn {
           background: rgba(0, 0, 0, 0);
           background: rgba(0, 0, 0, 0);
-          border    : 1px solid #CCCCCC;
+          // border    : 1px solid #CCCCCC;
+          background: #E6E9F0;
 
 
         }
         }
 
 
@@ -378,9 +379,13 @@ samp {
     }
     }
 
 
     .download-btn {
     .download-btn {
-      border    : 1px solid #3a3d3d !important;
-      color     : #3a3d3d !important;
-      background: none !important;
+      // border    : 1px solid #3a3d3d !important;
+      color     : #000 !important;
+      // background: none !important;
+
+      // background: rgba(0, 0, 0, 0);
+
+      background: #E6E9F0 !important;;
     }
     }
   }
   }
 }
 }

+ 1 - 1
src/views/scene/index.vue

@@ -359,7 +359,7 @@ onActivated(async () => {
       flex-direction: column;
       flex-direction: column;
       align-items: center;
       align-items: center;
       justify-content: center;
       justify-content: center;
-      background: rgba(255, 255, 255, 0.1);
+      background: #E6E9F0;
       font-size: 16px;
       font-size: 16px;
       border-radius: 4px;
       border-radius: 4px;
       cursor: pointer;
       cursor: pointer;