Jelajahi Sumber

fix: replaceAll

xzw 11 bulan lalu
induk
melakukan
ec4a6a4b71

+ 7 - 5
public/lib/potree/potree.js

@@ -4594,10 +4594,11 @@
 	  replaceAll: function replaceAll(str, f, e) {
 	    //f全部替换成e
 
-	    if (str.replaceAll) return str.replaceAll(f, e);else {
-	      var reg = new RegExp(f, "g"); //创建正则RegExp对象  
-	      return str.replace(reg, e); //str.split(f).join(e);
-	    }
+	    /* if(str.replaceAll ) return str.replaceAll(f, e)
+	    else{ */
+	    var reg = new RegExp(f, "g"); //创建正则RegExp对象  
+	    return str.replace(reg, e); //str.split(f).join(e);
+	    //}
 	  },
 	  dealURL(url) {
 	    var urlNew = this.replaceAll(url, "\\+", "%2B"); // 浏览器似乎不支持访问带+的地址
@@ -30397,6 +30398,7 @@
 	          });
 	          this.addEventListener('flyToPanoDone', e => {
 	            //漫游到另一个模型就要选中这个模型
+	            if (!e.makeIt) return;
 	            var model = this.currentPano.pointcloud;
 	            if (model != lastModel) {
 	              this.changeModelMat(lastModel);
@@ -79923,7 +79925,7 @@
 	            fromDataset: true,
 	            quaternion: e.rotInModel,
 	            getQuaternion: true,
-	            model: e.model
+	            object: e.model
 	          });
 	          sections.push(e);
 	        }

File diff ditekan karena terlalu besar
+ 1 - 1
public/lib/potree/potree.js.map


+ 1 - 343
public/test-case/model-list-demo.json

@@ -61,349 +61,7 @@
                 "visible": 0,
                 "location": null
             }
-        },
-        {
-            "caseId": null,
-            "fusionNumId": 782,
-            "fusionId": 231,
-            "modelId": 834,
-            "hide": 0,
-            "transform": {
-                "scale": [
-                    100,
-                    100,
-                    100
-                ],
-                "position": {
-                    "x": -22.35873,
-                    "y": -37.39679,
-                    "z": -1.9892550
-                },
-                "rotation": {
-                    "x": 1.5425202,
-                    "y": 1.04879730,
-                    "z": 0.010966
-                }
-            },
-            "opacity": 100.0,
-            "bottom": 0.0,
-            "token": null,
-            "sceneData": {
-                "modelId": 834,
-                "modelTitle": "人_obj",
-                "modelDateType": "obj",
-                "modelSize": "81.05MB",
-                "showInPano": true,
-                "type": 3,
-                "modelObjUrl": null,
-                "modelGlbUrl": "[\"https://4dkk.4dage.com/fusion/prod/model/glb/868/man001.glb\"]",
-                "userName": "13169663387",
-                "modelType": "glb",
-                "num": null,
-                "tbStatus": 0,
-                "createStatus": 1,
-                "createTime": "2024-07-06 12:10:13",
-                "updateTime": "2024-07-06 12:10:40",
-                "deptId": "4",
-                "deptName": "公安部演示小组",
-                "id": null,
-                "buildObjStatus": null,
-                "name": null,
-                "payStatus": null,
-                "sceneName": null,
-                "snCode": null,
-                "status": 2,
-                "thumb": null,
-                "title": null,
-                "viewCount": null,
-                "isLaser": null,
-                "phone": null,
-                "bind": true,
-                "location": null
-            }
-        },
-        {
-            "caseId": null,
-            "fusionNumId": 778,
-            "fusionId": 231,
-            "modelId": 811,
-            "hide": 0,
-            "transform": {
-                "scale": [
-                    100.0,
-                    100.0,
-                    100.0
-                ],
-                "position": {
-                    "x": -10.44701258911915,
-                    "y": -42.66079106735544,
-                    "z": 9.402257810415175
-                },
-                "rotation": {
-                    "x": -1.5707963267948963,
-                    "y": 0.36848723541801,
-                    "z": 3.141592653589793
-                }
-            },
-            "opacity": 100.0,
-            "bottom": 0.0,
-            "token": null,
-            "sceneData": {
-                "modelId": 811,
-                "modelTitle": "展厅室内_mesh",
-                "modelDateType": "b3dm",
-                "modelSize": "4.55MB",
-                "type": 4,
-                "modelObjUrl": "/home/tomcat/jar-fusion-8808/prod/model/SS-X5apgUqrn4n/mesh.obj",
-                "modelGlbUrl": "[\"https://4dkk.4dage.com/scene_view_data/SS-X5apgUqrn4n/images/3dtiles/tileset.json\"]\r",
-                "userName": null,
-                "modelType": "b3dm",
-                "num": "SS-X5apgUqrn4n",
-                "tbStatus": 0,
-                "createStatus": 1,
-                "createTime": "2022-11-18 17:35:53",
-                "updateTime": "2024-07-08 11:03:26",
-                "deptId": "4",
-                "deptName": "公安部演示小组",
-                "id": 3260229,
-                "buildObjStatus": 0,
-                "name": "展厅室内_mesh",
-                "payStatus": 1,
-                "sceneName": "展厅室内",
-                "snCode": "GABSS0001",
-                "status": 2,
-                "thumb": "https://4dkk.4dage.com/scene_edit_data/SS-X5apgUqrn4n/user/thumb-1k.jpg",
-                "title": "展厅室内",
-                "viewCount": 49,
-                "isLaser": false,
-                "phone": null,
-                "bind": true,
-                "visible": 1,
-                "location": null
-            }
-        },
-        {
-            "caseId": null,
-            "fusionNumId": 805,
-            "fusionId": 240,
-            "modelId": 874,
-            "hide": 0,
-            "transform": {
-                "scale": [
-                    100.0,
-                    100.0,
-                    100.0
-                ],
-                "position": {"x": 21.718078050324927, "y": -116.62798835721699, "z": -2.004813867380852},
-                "rotation": {
-                    "x": 0.0,
-                    "y": 0.0,
-                    "z": -0.4000990367565785
-                }
-            },
-            "opacity": 100.0,
-            "bottom": 0.0,
-            "token": null,
-            "sceneData": {
-                "modelId": 874,
-                "modelTitle": "港11室内_点云",
-                "modelDateType": "obj",
-                "modelSize": null,
-                "type": 5,
-                "modelObjUrl": null,
-                "modelGlbUrl": null,
-                "userName": null,
-                "modelType": "pointcloud",
-                "num": "SG-qA9txZVJEnu",
-                "tbStatus": 0,
-                "createStatus": 1,
-                "createTime": "2024-03-21 12:18:30",
-                "updateTime": "2024-08-09 17:18:39",
-                "deptId": "4",
-                "deptName": "公安部演示小组",
-                "id": 4089,
-                "buildObjStatus": 1,
-                "name": "港11室内_点云",
-                "payStatus": 1,
-                "sceneName": null,
-                "snCode": "GAB000001",
-                "status": 2,
-                "thumb": "https://laser-oss.4dkankan.com/static/img_default/pc.jpg",
-                "title": "MP对比",
-                "viewCount": 38,
-                "isLaser": true,
-                "phone": "18612080104",
-                "bind": true,
-                "prefix": "https://laser.4dkankan.com/backend",
-                "visible": 0,
-                "location": 4
-            }
-        },
-        {
-            "caseId": null,
-            "fusionNumId": 980,
-            "fusionId": 181,
-            "modelId": 1098,
-            "hide": 0,
-            "transform": {
-                "scale": [
-                    100.0,
-                    100.0,
-                    100.0
-                ],
-                "position": {"x": 87.75751449768335, "y": -120.36286009836489, "z": 1.4672641534166577},
-                "rotation": {
-                    "x": 0.0,
-                    "y": 0.0,
-                    "z": -0.395517181031977
-                }
-            },
-            "opacity": 100.0,
-            "bottom": 0.0,
-            "token": null,
-            "sceneData": {
-                "modelId": 1098,
-                "modelTitle": null,
-                "modelDateType": "obj",
-                "modelSize": "72.24MB",
-                "type": 6,
-                "modelObjUrl": "/home/tomcat/jar-fusion-8808/test/model/SG-t-nmksnkWGvhM/mesh.obj",
-                "modelGlbUrl": "[\"https://4dkk.4dage.com/fusion/test/model/SG-t-nmksnkWGvhM/mesh/floor_0/lod_0/mesh.glb\"]",
-                "userName": null,
-                "modelType": "glb",
-                "num": "SG-t-nmksnkWGvhM",
-                "tbStatus": 0,
-                "createStatus": 1,
-                "createTime": "2024-08-23 16:37:17",
-                "updateTime": "2024-08-26 10:18:49",
-                "deptId": "DEP000011759420653032312832",
-                "deptName": "数据统计总队",
-                "id": 3008306,
-                "buildObjStatus": 0,
-                "name": "一楼窗外(8.23 拼接测试)",
-                "payStatus": 1,
-                "sceneName": "一楼窗外(8.23 拼接测试)",
-                "snCode": "BDVT00002",
-                "status": 2,
-                "thumb": "https://4dkk.4dage.com/scene_view_data/SG-t-nmksnkWGvhM/images/floor_0.png?t=1724402237352",
-                "title": "一楼窗外(8.23 拼接测试)",
-                "viewCount": 3,
-                "isLaser": false,
-                "phone": null,
-                "bind": true,
-                "location": null
-            }
-        },
-        {
-            "caseId": null,
-            "fusionNumId": 978,
-            "fusionId": 181,
-            "modelId": 1099,
-            "hide": 0,
-            "transform": {
-                "scale": [
-                    100.0,
-                    100.0,
-                    100.0
-                ],
-                "position": {"x":66.52315710699722, "y": -110.45068505837203, "z": 1.3805386895251424},
-                "rotation": {
-                    "x": 0.0,
-                    "y": 0.0,
-                    "z": 1.1630612485179241
-                }
-            },
-            "opacity": 100.0,
-            "bottom": 0.0,
-            "token": null,
-            "sceneData": {
-                "modelId": 1099,
-                "modelTitle": null,
-                "modelDateType": "obj",
-                "modelSize": "16.67MB",
-                "type": 6,
-                "modelObjUrl": "/home/tomcat/jar-fusion-8808/test/model/SG-t-ZD62GqBRAf2/mesh.obj",
-                "modelGlbUrl": "[\"https://4dkk.4dage.com/fusion/test/model/SG-t-ZD62GqBRAf2/mesh/floor_0/lod_0/mesh.glb\"]",
-                "userName": null,
-                "modelType": "glb",
-                "num": "SG-t-ZD62GqBRAf2",
-                "tbStatus": 0,
-                "createStatus": 1,
-                "createTime": "2024-08-23 16:03:58",
-                "updateTime": "2024-08-26 10:18:49",
-                "deptId": "DEP000011759420653032312832",
-                "deptName": "数据统计总队",
-                "id": 3008304,
-                "buildObjStatus": 0,
-                "name": "公司外一楼(8.23 拼接测试)",
-                "payStatus": 1,
-                "sceneName": "公司外一楼(8.23 拼接测试)",
-                "snCode": "BDVT00002",
-                "status": 2,
-                "thumb": "https://4dkk.4dage.com/scene_view_data/SG-t-ZD62GqBRAf2/images/floor_0.png?t=1724400238578",
-                "title": "公司外一楼(8.23 拼接测试)",
-                "viewCount": 1,
-                "isLaser": false,
-                "phone": null,
-                "bind": true,
-                "location": null
-            }
-        },
-        {
-            "caseId": null,
-            "fusionNumId": 977,
-            "fusionId": 181,
-            "modelId": 1096,
-            "hide": 0,
-            "transform": {
-                "scale": [
-                    100.0,
-                    100.0,
-                    100.0
-                ],
-                "position": {"x": 95.77650916161897, "y": -110.19314554875757, "z": 1.2033768049697668},
-                "rotation": {
-                    "x": 0.0,
-                    "y": 0.0,
-                    "z": 2.7123698466041453
-                }
-            },
-            "opacity": 100.0,
-            "bottom": 0.0,
-            "token": null,
-            "sceneData": {
-                "modelId": 1096,
-                "modelTitle": null,
-                "modelDateType": "obj",
-                "modelSize": "9.60MB",
-                "type": 6,
-                "modelObjUrl": "/home/tomcat/jar-fusion-8808/test/model/SG-t-IKm8dlx3ryg/mesh.obj",
-                "modelGlbUrl": "[\"https://4dkk.4dage.com/fusion/test/model/SG-t-IKm8dlx3ryg/mesh/floor_0/lod_0/mesh.glb\"]",
-                "userName": null,
-                "modelType": "glb",
-                "num": "SG-t-IKm8dlx3ryg",
-                "tbStatus": 0,
-                "createStatus": 1,
-                "createTime": "2024-08-22 15:30:04",
-                "updateTime": "2024-08-23 14:36:54",
-                "deptId": "DEP000011759420653032312832",
-                "deptName": "数据统计总队",
-                "id": 3008288,
-                "buildObjStatus": 0,
-                "name": "一楼办公区8.22(拼接测试)",
-                "payStatus": 1,
-                "sceneName": "一楼办公区8.22(拼接测试)",
-                "snCode": "BDVT00002",
-                "status": 2,
-                "thumb": "https://4dkk.4dage.com/scene_view_data/SG-t-IKm8dlx3ryg/images/floor_0.png?t=1724311804573",
-                "title": "一楼办公区8.22(拼接测试)",
-                "viewCount": 5,
-                "isLaser": false,
-                "phone": null,
-                "bind": true,
-                "location": null
-            }
-        }
+        } 
     ],
     "success": true,
     "timestamp": 1722216629620