xzw 1 месяц назад
Родитель
Сommit
56e9bb2afd

+ 3 - 1
libs/other/UPNG.js

@@ -1223,4 +1223,6 @@ if(G>r)r=G;i++}while(i<y){A[i<<1]=0;A[(i<<1)+1]=0;i++}return r}return v}();
 	UPNG.quantize.getNearest=getNearest;
 })();
 
-window.UPNG = UPNG
+//window.UPNG = UPNG
+
+export default UPNG

+ 7 - 0
src/Potree.js

@@ -153,6 +153,8 @@ export const debug = {};
 
 let scriptPath = "";
 
+
+
 if (document.currentScript && document.currentScript.src) {
 	scriptPath = new URL(document.currentScript.src + '/..').href;
 	if (scriptPath.slice(-1) === '/') {
@@ -167,6 +169,11 @@ if (document.currentScript && document.currentScript.src) {
 	console.error('Potree was unable to find its script path using document.currentScript. Is Potree included with a script tag? Does your browser support this function?');
 }
 
+//去掉加的版本号,否则报错。http://192.168.0.59:8080/static/lib/potree/potree.js?v=2.12.4/..  
+console.log('scriptPath', scriptPath)   
+//scriptPath = scriptPath.split('potree.js')[0]
+ 
+
 let resourcePath = scriptPath + '/resources';
 
 // scriptPath: build/potree

+ 1 - 1
src/custom/potree.shim.js

@@ -1277,7 +1277,7 @@ Potree.updateVisibilityStructures = function(pointclouds, camera, areaSize) {
 
 
 Potree.updateVisibility = function(pointclouds, camera, areaSize){
-
+    if(Potree.settings.dontShowPoints)return
 	let numVisibleNodes = 0;
 	let numVisiblePoints = 0;
 

+ 1 - 1
src/custom/utils/Common.js

@@ -2,7 +2,7 @@
 
 import * as THREE from "../../../libs/three.js/build/three.module.js";
 import math from './math.js'
-import '../../../libs/other/UPNG.js'
+import UPNG from '../../../libs/other/UPNG.js'
  
  
 

+ 2 - 6
src/custom/viewer/ViewerNew.js

@@ -3503,16 +3503,12 @@ export class Viewer extends ViewerBase{
             }
            
             
-            if(!viewport.noPointcloud ){ 
-
+            if(!viewport.noPointcloud ){  
                 if(params_.needWaitLoadPoint){
                     await this.waitPointLoad(null, params_.maxTimeForPointLoad,  viewport ) //resolution得用split前整个的viewport的
                 }else{
                     this.updateViewPointcloud(params.camera, viewport.resolution, true)  
-                }
-                
-            
-                
+                } 
                  
                 pRenderer.render(params); //渲染点云 skybox。 
                 

+ 3 - 0
src/navigation/InputHandlerNew.js

@@ -837,6 +837,9 @@ export class InputHandler extends THREE.EventDispatcher {
         let intersect, intersectPoint, intersectOnModel, allElements 
         let camera = viewport.camera
         let raycaster 
+        if(Potree.settings.pauseIntersect)return
+        
+        
         
         viewer.addTimeMark('getIntersect','start')