目录
- 项目地址
- 实现效果
- 实现方法
项目地址
https://github.com/zhengjie9510/webgis-demo
实现效果
实现方法
let angle = 0.0
viewer.camera.lookAt(position, new Cesium.HeadingPitchRange(Cesium.Math.toRadians(angle), Cesium.Math.toRadians(-30), 2000))
viewer.clock.onTick.addEventListener(() => {
angle += 0.5 * viewer.clock.multiplier;
const heading = Cesium.Math.toRadians(angle)
const pitch = viewer.camera.pitch
viewer.camera.lookAt(position, new Cesium.HeadingPitchRange(heading, pitch, 2000))
});