fix:更改俯视角
This commit is contained in:
parent
145b971fdd
commit
d120b827ae
|
@ -418,8 +418,6 @@ export default {
|
||||||
var url = "photon_tree.glb";
|
var url = "photon_tree.glb";
|
||||||
var height = 0;
|
var height = 0;
|
||||||
viewer.entities.removeAll(); //加载之前先清楚所有entity
|
viewer.entities.removeAll(); //加载之前先清楚所有entity
|
||||||
// 88.64349,
|
|
||||||
// 42.72285,
|
|
||||||
var position = Cesium.Cartesian3.fromDegrees(
|
var position = Cesium.Cartesian3.fromDegrees(
|
||||||
88.64349,
|
88.64349,
|
||||||
42.72285,
|
42.72285,
|
||||||
|
@ -450,15 +448,18 @@ export default {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
var destination_tree = Cesium.Cartesian3.fromDegrees(
|
var destination_tree = Cesium.Cartesian3.fromDegrees(
|
||||||
88.64349,
|
88.64355,
|
||||||
42.72285,
|
42.715,
|
||||||
900
|
500
|
||||||
);
|
);
|
||||||
var roll_tree = Cesium.Math.toRadians(-100);
|
var heading_tree = Cesium.Math.toRadians(1); // 指定航向角度
|
||||||
var hpr_tree = new Cesium.HeadingPitchRoll(heading, pitch, roll_tree);
|
var pitch_tree = Cesium.Math.toRadians(-30); // 俯仰角度
|
||||||
var orientation_camer = Cesium.Transforms.headingPitchRollQuaternion(
|
var roll_tree = Cesium.Math.toRadians(0); // 指定滚转角度
|
||||||
destination_tree,
|
|
||||||
hpr_tree
|
var orientation_camer = new Cesium.HeadingPitchRoll(
|
||||||
|
heading_tree,
|
||||||
|
pitch_tree,
|
||||||
|
roll_tree
|
||||||
);
|
);
|
||||||
viewer.camera.setView({
|
viewer.camera.setView({
|
||||||
destination: destination_tree,
|
destination: destination_tree,
|
||||||
|
|
Loading…
Reference in New Issue