|
@@ -80340,7 +80340,7 @@ void main()
|
|
|
e.drag.object.isDragging = true;
|
|
|
|
|
|
|
|
|
- I = e.intersect && (e.intersect.orthoIntersect || e.intersect.location);
|
|
|
+ I = e.intersect && (/* e.intersect.orthoIntersect || */ e.intersect.location);
|
|
|
|
|
|
//记录数据集
|
|
|
|
|
@@ -91529,10 +91529,22 @@ void main()
|
|
|
navCubeViewer.switchView('ortho', directions[name] , ()=>{
|
|
|
this.changingView = false;
|
|
|
faceMesh.material.uniforms.faceColor.value.set(Colors.black);
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ if(name == 'Top'){
|
|
|
+ navCubeViewer.addEventListener('enterTopView',()=>{
|
|
|
+ faceMesh.dispatchEvent('click');
|
|
|
+
|
|
|
+ });
|
|
|
+ navCubeViewer.addEventListener('leaveTopView',()=>{
|
|
|
+ if(navCubeViewer.lastView){
|
|
|
+ navCubeViewer.switchView2(navCubeViewer.lastView);
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
|
|
|
- });
|
|
|
+ }
|
|
|
|
|
|
});
|
|
|
};
|
|
@@ -91743,6 +91755,15 @@ void main()
|
|
|
} */
|
|
|
switchView(type, {yaw, pitch, dir}={}, done){
|
|
|
let view = viewer.mainViewport.view;
|
|
|
+ this.lastView = view.clone();
|
|
|
+ if(viewer.mainViewport.camera.type == 'OrthographicCamera'){
|
|
|
+ this.lastView.isOrtho = true;
|
|
|
+ this.lastView.zoom = viewer.mainViewport.camera.zoom;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
if(type == 'ortho'){
|
|
|
let startCamera, endCamera;
|
|
|
if(viewer.mainViewport.camera != viewer.scene.cameraO){
|
|
@@ -91805,6 +91826,66 @@ void main()
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ switchView2(viewInfo){
|
|
|
+ let view = viewer.mainViewport.view;
|
|
|
+ let startCamera, endCamera;
|
|
|
+
|
|
|
+
|
|
|
+ if(viewInfo.isOrtho){
|
|
|
+ if(viewer.mainViewport.camera != viewer.scene.cameraO){
|
|
|
+
|
|
|
+ startCamera = viewer.scene.cameraP;
|
|
|
+ endCamera = viewer.scene.cameraO;
|
|
|
+
|
|
|
+
|
|
|
+ }else {
|
|
|
+ view.moveOrthoCamera(viewer.mainViewport, {endPosition:viewInfo.position,
|
|
|
+ endPitch: viewInfo.pitch, endYaw: viewInfo.yaw , zoom: viewInfo.zoom,
|
|
|
+ callback:()=>{
|
|
|
+
|
|
|
+ },
|
|
|
+ }, 500);
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ if(viewer.mainViewport.camera == viewer.scene.cameraO){
|
|
|
+ startCamera = viewer.scene.cameraO;
|
|
|
+ endCamera = viewer.scene.cameraP;
|
|
|
+ }else {
|
|
|
+ view.setView(viewer.mainViewport, { position:view.position,
|
|
|
+ endPitch: viewInfo.pitch, endYaw: viewInfo.yaw ,
|
|
|
+ startCamera, endCamera,
|
|
|
+ callback:()=>{
|
|
|
+
|
|
|
+ },
|
|
|
+ }, 500);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if(startCamera){
|
|
|
+ view.tranCamera(viewer.mainViewport, { position:viewInfo.position,
|
|
|
+ endPitch: viewInfo.pitch, endYaw: viewInfo.yaw ,
|
|
|
+ startCamera, endCamera, midCamera:viewer.scene.cameraBasic ,
|
|
|
+ callback:()=>{
|
|
|
+
|
|
|
+ },
|
|
|
+ }, 500);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
rotateSideCamera(angle){
|
|
|
this.splitScreen.rotateSideCamera(viewer.mainViewport,angle);
|
|
|
}
|