From d120b827ae1bb777e01d89784cc7f99444545955 Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 3 Apr 2024 17:27:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=9B=B4=E6=94=B9=E4=BF=AF=E8=A7=86?= =?UTF-8?q?=E8=A7=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bigScreen/cesiumtest.vue | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/views/bigScreen/cesiumtest.vue b/src/views/bigScreen/cesiumtest.vue index 861c6f8d..7550eeee 100644 --- a/src/views/bigScreen/cesiumtest.vue +++ b/src/views/bigScreen/cesiumtest.vue @@ -418,8 +418,6 @@ export default { var url = "photon_tree.glb"; var height = 0; viewer.entities.removeAll(); //加载之前先清楚所有entity - // 88.64349, - // 42.72285, var position = Cesium.Cartesian3.fromDegrees( 88.64349, 42.72285, @@ -450,15 +448,18 @@ export default { }, }); var destination_tree = Cesium.Cartesian3.fromDegrees( - 88.64349, - 42.72285, - 900 + 88.64355, + 42.715, + 500 ); - var roll_tree = Cesium.Math.toRadians(-100); - var hpr_tree = new Cesium.HeadingPitchRoll(heading, pitch, roll_tree); - var orientation_camer = Cesium.Transforms.headingPitchRollQuaternion( - destination_tree, - hpr_tree + var heading_tree = Cesium.Math.toRadians(1); // 指定航向角度 + var pitch_tree = Cesium.Math.toRadians(-30); // 俯仰角度 + var roll_tree = Cesium.Math.toRadians(0); // 指定滚转角度 + + var orientation_camer = new Cesium.HeadingPitchRoll( + heading_tree, + pitch_tree, + roll_tree ); viewer.camera.setView({ destination: destination_tree,