|
@@ -63255,7 +63255,7 @@ void main() {
|
|
return n[0]
|
|
return n[0]
|
|
};
|
|
};
|
|
|
|
|
|
- var start = function(dom, mapDom, number, fileServer, webSite){ //t-Zvd3w0m
|
|
|
|
|
|
+ var start = function(dom, mapDom, number ){ //t-Zvd3w0m
|
|
/* {
|
|
/* {
|
|
let obj = JSON.parse(localStorage.getItem('setting'))
|
|
let obj = JSON.parse(localStorage.getItem('setting'))
|
|
for(let i in obj){
|
|
for(let i in obj){
|
|
@@ -63264,11 +63264,9 @@ void main() {
|
|
}
|
|
}
|
|
*/
|
|
*/
|
|
Potree.settings.number = number || 't-o5YMR13';// 't-iksBApb'// 写在viewer前
|
|
Potree.settings.number = number || 't-o5YMR13';// 't-iksBApb'// 写在viewer前
|
|
- Potree.fileServer = fileServer;
|
|
|
|
|
|
|
|
|
|
|
|
- webSite && (Potree.settings.webSite = webSite);
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
let viewer = new Potree.Viewer(dom , mapDom);
|
|
let viewer = new Potree.Viewer(dom , mapDom);
|
|
|
|
|
|
@@ -63565,7 +63563,7 @@ void main() {
|
|
//=======================================================================
|
|
//=======================================================================
|
|
|
|
|
|
|
|
|
|
- var panoEditStart = function(dom, number, fileServer, webSite){
|
|
|
|
|
|
+ var panoEditStart = function(dom, number, fileServer){
|
|
Potree.settings.editType = 'pano';
|
|
Potree.settings.editType = 'pano';
|
|
Potree.settings.number = number;
|
|
Potree.settings.number = number;
|
|
|
|
|
|
@@ -63652,7 +63650,7 @@ void main() {
|
|
|
|
|
|
panoData.forEach((pano, index)=>{
|
|
panoData.forEach((pano, index)=>{
|
|
//let cloudPath = `${Potree.scriptPath}/data/panoEdit/uuidcloud/${pano.uuid}/cloud.js`
|
|
//let cloudPath = `${Potree.scriptPath}/data/panoEdit/uuidcloud/${pano.uuid}/cloud.js`
|
|
- let cloudPath = `https://laser-oss.4dkankan.com/testdata/${Potree.settings.number}/data/bundle_${Potree.settings.number}/building/uuidcloud/${pano.uuid}/cloud.js`;
|
|
|
|
|
|
+ let cloudPath = `https://laser-oss.4dkankan.com/${Potree.settings.webSite}/${Potree.settings.number}/data/bundle_${Potree.settings.number}/building/uuidcloud/${pano.uuid}/cloud.js`;
|
|
|
|
|
|
let name = datasetId + '-'+pano.uuid;
|
|
let name = datasetId + '-'+pano.uuid;
|
|
let timeStamp = 0;
|
|
let timeStamp = 0;
|
|
@@ -63844,7 +63842,10 @@ void main() {
|
|
|
|
|
|
|
|
|
|
let loadDone = (model)=>{
|
|
let loadDone = (model)=>{
|
|
-
|
|
|
|
|
|
+ model.dataset_id = prop.id; //唯一标识
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
if(prop.isFirstLoad){
|
|
if(prop.isFirstLoad){
|
|
modelEditing = model;
|
|
modelEditing = model;
|
|
MergeEditor.setModelBtmHeight(model, 0); //默认离地高度为0
|
|
MergeEditor.setModelBtmHeight(model, 0); //默认离地高度为0
|
|
@@ -87375,7 +87376,7 @@ void main() {
|
|
if(!this.pointcloud.hasDepthTex || this.depthTex || this.depthTexLoading)return
|
|
if(!this.pointcloud.hasDepthTex || this.depthTex || this.depthTexLoading)return
|
|
this.depthTexLoading = true;
|
|
this.depthTexLoading = true;
|
|
let src = Potree.settings.number == 'SS-t-7DUfWAUZ3V' ? `${Potree.scriptPath}/data/${Potree.settings.number}/depthMap/${this.originID}.png`
|
|
let src = Potree.settings.number == 'SS-t-7DUfWAUZ3V' ? `${Potree.scriptPath}/data/${Potree.settings.number}/depthMap/${this.originID}.png`
|
|
- : `https://laser-oss.4dkankan.com/testdata/${this.pointcloud.sceneCode}/data/${this.pointcloud.sceneCode}/depthmap/${this.originID}.png`;
|
|
|
|
|
|
+ : `https://laser-oss.4dkankan.com/${Potree.settings.webSite}/${this.pointcloud.sceneCode}/data/${this.pointcloud.sceneCode}/depthmap/${this.originID}.png`;
|
|
let texture = texLoader$2.load( src, ()=>{
|
|
let texture = texLoader$2.load( src, ()=>{
|
|
this.depthTex = texture;
|
|
this.depthTex = texture;
|
|
this.images360.dispatchEvent({type:'loadedDepthImg', pano:this, loaded:true});
|
|
this.images360.dispatchEvent({type:'loadedDepthImg', pano:this, loaded:true});
|
|
@@ -103654,14 +103655,23 @@ ENDSEC
|
|
|
|
|
|
zoomToLocation(mouse){
|
|
zoomToLocation(mouse){
|
|
let I = viewer.inputHandler.intersect;
|
|
let I = viewer.inputHandler.intersect;
|
|
|
|
+ let object = I.object || I.pointcloud;
|
|
|
|
+
|
|
if(I){
|
|
if(I){
|
|
I = I.location;
|
|
I = I.location;
|
|
}
|
|
}
|
|
- if(!I)return;
|
|
|
|
|
|
|
|
- let dis = this.scene.view.position.distanceTo(I);
|
|
|
|
-
|
|
|
|
- let distance = MathUtils.clamp(dis, 0.2, 3);
|
|
|
|
|
|
+ if(!I || !object)return;
|
|
|
|
+
|
|
|
|
+ let dis = this.scene.view.position.distanceTo(I);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ let bound = object.boundingBox.clone().applyMatrix4(object.matrixWorld);
|
|
|
|
+ let size = bound.getSize(new Vector3);
|
|
|
|
+ let len = size.length();
|
|
|
|
+
|
|
|
|
+ let distance = MathUtils.clamp(dis, 0.1, Math.max(len * 0.1, 3) );
|
|
|
|
+
|
|
minRadius = distance;
|
|
minRadius = distance;
|
|
viewer.focusOnObject({ position:I }, 'point', null, {distance});
|
|
viewer.focusOnObject({ position:I }, 'point', null, {distance});
|
|
|
|
|
|
@@ -117397,11 +117407,11 @@ ENDSEC
|
|
ground.add(line2);
|
|
ground.add(line2);
|
|
|
|
|
|
ground.material.polygonOffset = true; //多边形偏移(视觉上没有移动模型位置),防止闪烁
|
|
ground.material.polygonOffset = true; //多边形偏移(视觉上没有移动模型位置),防止闪烁
|
|
- ground.material.polygonOffsetFactor = 10; //多边形偏移因子
|
|
|
|
|
|
+ ground.material.polygonOffsetFactor = 100; //多边形偏移因子
|
|
ground.material.polygonOffsetUnits = 10; //多边形偏移单位
|
|
ground.material.polygonOffsetUnits = 10; //多边形偏移单位
|
|
//ground.material.depthTest = false
|
|
//ground.material.depthTest = false
|
|
line1.material.polygonOffset = true;
|
|
line1.material.polygonOffset = true;
|
|
- line1.material.polygonOffsetFactor = 20;
|
|
|
|
|
|
+ line1.material.polygonOffsetFactor = 130;
|
|
line1.material.polygonOffsetUnits = 10;
|
|
line1.material.polygonOffsetUnits = 10;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -118301,7 +118311,7 @@ ENDSEC
|
|
}else {
|
|
}else {
|
|
|
|
|
|
let n = camera.position.distanceTo(this.position);
|
|
let n = camera.position.distanceTo(this.position);
|
|
- s = 1 + .01 * n;
|
|
|
|
|
|
+ s = 1 + .1 * n;
|
|
n < 1 && (s -= 1 - n);
|
|
n < 1 && (s -= 1 - n);
|
|
}
|
|
}
|
|
this.scale.set(s, s, s);
|
|
this.scale.set(s, s, s);
|