xzw 5 달 전
부모
커밋
ca37983744
5개의 변경된 파일11개의 추가작업 그리고 13개의 파일을 삭제
  1. 2 1
      src/Potree.js
  2. 1 1
      src/custom/settings.js
  3. 1 1
      src/custom/start.js
  4. 2 3
      src/custom/viewer/ViewerNew.js
  5. 5 7
      src/custom/viewer/map/Map.js

+ 2 - 1
src/Potree.js

@@ -616,7 +616,8 @@ export function load4dkkPanos(sceneCode, model, defaultRotation, done, tileRes){
     model.rotateInvMatrix = new THREE.Matrix4
     
     model.datasetData = {
-        sceneVersion : 'V4' 
+        sceneVersion : 'V4' ,
+        mapping: model.props.raw.mapping
     }
     model.tileRes = tileRes
     model.bound = new THREE.Box3

+ 1 - 1
src/custom/settings.js

@@ -87,7 +87,7 @@ const config = {//配置参数   不可修改
                 name = 'laserOSSRoot' 
             }else if(num === 3){
                 name = 'panoOSSRoot'
-            }else if(num === 3){
+            }else if(num === 8){
                 name = 'panoRoot'
             }
             return name

+ 1 - 1
src/custom/start.js

@@ -777,7 +777,7 @@ export function mergeEditStart(dom, mapDom){
                     /* if(!originDataset){
                         //应该是data为空,原因未知
                     } */
-                    
+                    Potree.settings.cloudAddMapping && (prefix2 += '/'+originDataset.mapping)
                     let timeStamp = originDataset.updateTime ? originDataset.updateTime.replace(/[^0-9]/ig,'') : '';  //每重算一次后缀随updateTime更新一次 
                     //let cloudPath = `${Potree.settings.urls.prefix1}/${Potree.settings.webSite}/${sceneCode}/data/${sceneCode}/webcloud/cloud.js` 
                     let cloudPath = `${prefix2}/${originDataset.webBin}`  //webBin添加原因:每次裁剪之类的操作会换路径,因为oss文件缓存太严重,更新慢

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

@@ -5321,7 +5321,7 @@ export class Viewer extends ViewerBase{
             this.bound.boundingBox.getCenter(this.bound.center)
         }
         
-        viewer.farWhenShowPano = this.bound.boundSize.length() * 10//全景漫游时要能看到整个skybox 原本*2的但对于距离特远的数据集需要乘大一些否则会黑面
+        viewer.farWhenShowPano = Math.max(1000,this.bound.boundSize.length() * 10)//全景漫游时要能看到整个skybox 原本*2的但对于距离特远的数据集需要乘大一些否则会黑面
         
         
        /*  let boundPlane = new THREE.Box3()
@@ -5682,8 +5682,7 @@ export class Viewer extends ViewerBase{
                     //}//获取在scale为1时,表现出的大小
                     //Potree.Utils.makeTexDontResize(child.material.map) 
                     //console.log(child.name, 'roughness',child.material.roughness,'metalness',child.material.metalness)
-                    fileInfo_.unlit = true   
-                   
+                    
                     let changeMat = (oldMat)=>{
                         let mat = oldMat
                         if(fileInfo_.unlit && (!(oldMat instanceof BasicMaterial) /* || object.fileType == 'glb' */)){ //注释掉是因为已经写入到loader文件里了

+ 5 - 7
src/custom/viewer/map/Map.js

@@ -872,7 +872,7 @@ export class TiledMapFromEntity extends TiledMapBase{
         
         data.id = e.id
         data.globalLocation = Potree.Utils.VectorFactory.fromArray3(e.location)  
-        data.orientation = Potree.Utils.QuaternionFactory.fromArray(e.orientation) 
+        data.orientation = Potree.Utils.QuaternionFactory.fromArray(e.orientation)  //数据集支持其他方向旋转后不用这个了
          
          
         let pointcloud = viewer.scene.pointclouds.find(p=>p.dataset_id == e.datasetId) 
@@ -881,7 +881,7 @@ export class TiledMapFromEntity extends TiledMapBase{
         }else{
             data.filePath = `${Potree.settings.urls.prefix1}${e.file_path}`
         }
-        
+        this.pointcloud = pointcloud
         
           
         data.fileName = '$DEPTH/$X/$Y.png'  
@@ -924,13 +924,11 @@ export class TiledMapFromEntity extends TiledMapBase{
     
     get position(){
         return this.tiledMapEntity.location
-       /* enumerable: !0,
-       configurable: !0 */
+       
     }
     get quaternion(){
-        return this.tiledMapEntity.orientation
-        /* enumerable: !0,
-        configurable: !0 */
+        //return this.tiledMapEntity.orientation//数据集支持其他方向旋转后不用这个了
+        return  typeof(this.pointcloud.orientationUser ) == 'number' ? this.tiledMapEntity.orientation : this.pointcloud.orientationUser.clone()
     }
    
     getTileUrl(t, e, n) {