写一个定时器不断的更新模型的position就可以了,下面代码是用cesium自带的CallbackProperty做监听https://sandcastle.cesium.com/?src=3D%20Models.html&label=Allconst entity = viewer.entities.add({ name: url, //position: position, position: new Cesium.CallbackProperty(function (time, result) { endLongitude = startLongitude - 0.004 * Cesium.JulianDate.secondsDifference(time, startTime); return Cesium.Cartesian3.fromDegrees( endLongitude, 44.0503706, height ); }, false), orientation: orientation, model: { uri: url, minimumPixelSize: 128, maximumScale: 20000, }, }); viewer.trackedEntity = entity;
写一个定时器不断的更新模型的position就可以了,下面代码是用cesium自带的CallbackProperty做监听
https://sandcastle.cesium.com/?src=3D%20Models.html&label=All