|
@@ -75958,7 +75958,7 @@
|
|
|
},
|
|
|
selectModel(model) {
|
|
|
var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
|
- var fitBound = arguments.length > 2 ? arguments[2] : undefined;
|
|
|
+ var focus = arguments.length > 2 ? arguments[2] : undefined;
|
|
|
var by2d = arguments.length > 3 ? arguments[3] : undefined;
|
|
|
if (!model) {
|
|
|
model = this.selected;
|
|
@@ -75975,12 +75975,12 @@
|
|
|
if (this.selected) {
|
|
|
if (this.selected == model) return;else {
|
|
|
var transToolAttached = !!this.transformControls.object;
|
|
|
- this.selectModel(this.selected, false, fitBound, by2d);
|
|
|
+ this.selectModel(this.selected, false, focus, by2d);
|
|
|
transToolAttached && this.transformControls.attach(model);
|
|
|
}
|
|
|
}
|
|
|
this.selected = model;
|
|
|
- MergeEditor.focusOn(model, 500, !!fitBound); //通过在场景里点击模型的话,不focus
|
|
|
+ MergeEditor.focusOn(model, 500, !!focus); //通过在场景里点击模型的话,不focus
|
|
|
|
|
|
this.showModelOutline(model);
|
|
|
|
|
@@ -76052,7 +76052,7 @@
|
|
|
},*/
|
|
|
focusOn(objects) {
|
|
|
var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 400;
|
|
|
- var fitBound = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
|
+ var focus = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
|
var dontLookUp = arguments.length > 3 ? arguments[3] : undefined;
|
|
|
var dir = arguments.length > 4 ? arguments[4] : undefined;
|
|
|
if (!(objects instanceof Array)) {
|
|
@@ -76064,7 +76064,7 @@
|
|
|
});
|
|
|
var len = boundingBox.getSize(new Vector3()).length();
|
|
|
Potree.settings.cameraFar = Math.max(Potree.settings.cameraFar, len * 3);
|
|
|
- if (fitBound) {
|
|
|
+ if (focus) {
|
|
|
viewer.focusOnObject({
|
|
|
boundingBox
|
|
|
}, 'boundingBox', duration, {
|
|
@@ -82365,17 +82365,21 @@
|
|
|
//in front of model
|
|
|
if (this.camFollowObject.length == 1) {
|
|
|
var _model4 = this.camFollowObject[0];
|
|
|
- if (this.camFaceToObject) {
|
|
|
- var dis = 4;
|
|
|
- var dir = new Vector3(0, 0.1, 1).normalize(); //稍微朝上
|
|
|
- dir.multiplyScalar(dis).applyQuaternion(_model4.quaternion);
|
|
|
- var pos = new Vector3().addVectors(_model4.boundCenter, dir);
|
|
|
- viewer.mainViewport.view.position.copy(pos);
|
|
|
- viewer.mainViewport.view.lookAt(_model4.boundCenter);
|
|
|
- } else if (this.keepDistance) {
|
|
|
- //不改镜头方向 保持一定角度。如果要改镜头方向,把lookAt提前
|
|
|
- viewer.mainViewport.view.position.subVectors(_model4.boundCenter, viewer.mainViewport.view.direction.clone().multiplyScalar(oldDisToCam));
|
|
|
- viewer.mainViewport.view.radius = oldDisToCam;
|
|
|
+ if (viewer.images360.latestRequestMode == 'showPointCloud') {
|
|
|
+ if (this.camFaceToObject) {
|
|
|
+ var dis = 4;
|
|
|
+ var dir = new Vector3(0, 0.1, 1).normalize(); //稍微朝上
|
|
|
+ dir.multiplyScalar(dis).applyQuaternion(_model4.quaternion);
|
|
|
+ var pos = new Vector3().addVectors(_model4.boundCenter, dir);
|
|
|
+ viewer.mainViewport.view.position.copy(pos);
|
|
|
+ viewer.mainViewport.view.lookAt(_model4.boundCenter);
|
|
|
+ } else if (this.keepDistance) {
|
|
|
+ //不改镜头方向 保持一定角度。如果要改镜头方向,把lookAt提前
|
|
|
+ viewer.mainViewport.view.position.subVectors(_model4.boundCenter, viewer.mainViewport.view.direction.clone().multiplyScalar(oldDisToCam));
|
|
|
+ viewer.mainViewport.view.radius = oldDisToCam;
|
|
|
+ } else {
|
|
|
+ viewer.mainViewport.view.lookAt(_model4.boundCenter);
|
|
|
+ }
|
|
|
} else {
|
|
|
viewer.mainViewport.view.lookAt(_model4.boundCenter);
|
|
|
}
|