|
@@ -47919,7 +47919,7 @@
|
|
|
}
|
|
|
}),
|
|
|
a.addEventListener("global_mousemove", function(e) {
|
|
|
- !Potree.settings.unableNavigate && Potree.settings.ifShowMarker && e.hoverViewport == a.mainViewport && o.updateClosestPano(e.intersectPoint)
|
|
|
+ !Potree.settings.unableNavigate && Potree.settings.ifShowMarker && e.hoverViewport == a.mainViewport && o.updateClosestPano(e.intersect/* Point */)
|
|
|
}),
|
|
|
o.addEventListener("markerHover", function(e) {
|
|
|
o.updateClosestPano(e.pano, e.hovered)
|
|
@@ -48302,6 +48302,9 @@
|
|
|
key: "updateCube",
|
|
|
value: function(e, t) {
|
|
|
var n, i, r = this;
|
|
|
+
|
|
|
+ if(Potree.settings.displayMode != 'showPanos')return//add
|
|
|
+
|
|
|
if (!viewer.scene.pointclouds.some(function(e) {
|
|
|
return !e.hasDepthTex
|
|
|
}))
|
|
@@ -48480,11 +48483,22 @@
|
|
|
r.cube.scale.copy(t),
|
|
|
r.cube.position.copy(e)
|
|
|
};
|
|
|
+ //add----------
|
|
|
+ let getPanoBound = (pano)=>{//因漫游点可能在点云外部,如室外平地,所以需要union进漫游点
|
|
|
+ let panoBound = new THREE.Box3;
|
|
|
+ panoBound.expandByPoint(pano.position);
|
|
|
+ panoBound.expandByVector(new Cn(10,10,10));//give pano a margin
|
|
|
+ return pano.pointcloud.bound.clone().union(panoBound)
|
|
|
+ };
|
|
|
+ //-------------
|
|
|
+
|
|
|
+
|
|
|
if (this.cube.geometry.dispose(),
|
|
|
i) {
|
|
|
if (n.pointcloud != i.pointcloud)
|
|
|
if (100 < n.position.distanceTo(i.position)) {
|
|
|
- var t = n.pointcloud.bound.clone().union(i.pointcloud.bound)
|
|
|
+ //var t = n.pointcloud.bound.clone().union(i.pointcloud.bound)
|
|
|
+ var t = getPanoBound(n).union(getPanoBound(i))
|
|
|
, h = t.getSize(new Cn)
|
|
|
, p = Math.max(h.x, h.y, h.z);
|
|
|
return h.set(p, p, p),
|
|
@@ -48630,7 +48644,7 @@
|
|
|
this.cube.scale.set(1, 1, 1),
|
|
|
this.cube.position.set(0, 0, 0)
|
|
|
} else
|
|
|
- e(n.pointcloud.bound)
|
|
|
+ e(getPanoBound(n))//e(n.pointcloud.bound)
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
@@ -48761,7 +48775,25 @@
|
|
|
}, {
|
|
|
key: "updateClosestPano",
|
|
|
value: function(e, t) {
|
|
|
- if (this.isAtPano()) {
|
|
|
+
|
|
|
+
|
|
|
+ if (e instanceof Qg){
|
|
|
+ n = t ? e : null
|
|
|
+ }else {
|
|
|
+ if(this.isAtPano()){
|
|
|
+ return
|
|
|
+
|
|
|
+ }else {
|
|
|
+ if(this.flying)return;
|
|
|
+ var filterFuncs = [];
|
|
|
+ e = e && e.location;
|
|
|
+ if(!e)return
|
|
|
+ var e = "pano" != Potree.settings.editType ? [c.sortFunctions.floorDisSquaredToPoint(e)] : [c.sortFunctions.disSquaredToPoint(e)]
|
|
|
+ , n = Fm.find(this.panos, [], e)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /* if (this.isAtPano()) {
|
|
|
if (!(e instanceof Qg))
|
|
|
return;
|
|
|
n = t ? e : null
|
|
@@ -48772,7 +48804,7 @@
|
|
|
return;
|
|
|
var e = "pano" != Potree.settings.editType ? [c.sortFunctions.floorDisSquaredToPoint(e)] : [c.sortFunctions.disSquaredToPoint(e)]
|
|
|
, n = Fm.find(this.panos, [], e)
|
|
|
- }
|
|
|
+ } */
|
|
|
n != this.closestPano ? (n && (this.isPanoHover = !0),
|
|
|
this.closestPanoChanging(this.closestPano, n),
|
|
|
this.closestPano = n) : this.isPanoHover = !1
|
|
@@ -65560,7 +65592,7 @@
|
|
|
key: "exportSavingData",
|
|
|
value: function() {
|
|
|
var e, i = this, t = {};
|
|
|
- const rotQua = (new Sn()).setFromAxisAngle(new Cn(0,0,1), Math.PI)
|
|
|
+ const rotQua = (new Sn()).setFromAxisAngle(new Cn(0,0,1), Math.PI) //add
|
|
|
for (e in Potree.settings.datasetsPanos) {
|
|
|
var n = Potree.settings.datasetsPanos[e].panos.map(function(e) {
|
|
|
var t, n = [];
|
|
@@ -65570,7 +65602,7 @@
|
|
|
uuid: e.uuid,
|
|
|
pose: {
|
|
|
translation: r(e.position.clone()),
|
|
|
- rotation: r((new Sn).setFromRotationMatrix(e.panoMatrix)).premultiply(rotQua)
|
|
|
+ rotation: r((new Sn).setFromRotationMatrix(e.panoMatrix).premultiply(rotQua))
|
|
|
},
|
|
|
visibles: n
|
|
|
})
|
|
@@ -65592,6 +65624,7 @@
|
|
|
z: e.z
|
|
|
} : void 0
|
|
|
}
|
|
|
+
|
|
|
return console.log(t),
|
|
|
t
|
|
|
}
|
|
@@ -70057,8 +70090,8 @@
|
|
|
Potree.settings.sizeFitToLevel = !0);
|
|
|
function h(e) {
|
|
|
c.sidebar && c.sidebar.addAlignmentButton(e);
|
|
|
- var t = e.panos[0].dataRotation.z
|
|
|
- , n = e.panos[0].dataPosition.clone().negate();
|
|
|
+ var t = e.panos[0].dataRotation.z + Math.PI
|
|
|
+ , n = e.panos[0].dataPosition.clone()//.negate();
|
|
|
r.rotate(e, null, t),
|
|
|
r.translate(e, n),
|
|
|
e.updateMatrixWorld()
|