1. A concise explanation of the problem you’re experiencing.
I add by setInterval new position to SampledPositionPropery and track billboard on it. I see blinking (see attach).
How to make smooth displaing billboard?
2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.
const latitude = 28.458491;
const longitude = -80.528413;
const Parabola = (p, h) => {
const d = p/2;
const a = h/(d*d);
const b = 2ad;
return (t) => -att + b*t;
}
const altitude = Parabola(330, 100000);
const viewer = new Cesium.Viewer(‘cesiumContainer’, {
shouldAnimate: true,
});
const pathPosition = new Cesium.SampledPositionProperty();
const entityPath = viewer.entities.add({
position: pathPosition,
path: {
show: true,
leadTime: 0,
trailTime: Infinity,
width: 2,
resolution: 5,
material: new Cesium.ColorMaterialProperty(Cesium.Color.RED)
},
billboard : {
image : Cesium.buildModuleUrl(‘Assets/Textures/maki/rocket.png’),
scale : 0.5,
rotation: Cesium.Math.toRadians(45),
}
});
viewer.trackedEntity = entityPath;
let t = 0;
setInterval(() => {
let position = Cesium.Cartesian3.fromDegrees(longitude + t*0.001, latitude, altitude(t));
pathPosition.addSample(Cesium.JulianDate.fromDate(new Date()), position);
t++;
}, 1000);
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I need display trajectory in real time
4. The Cesium version you’re using, your operating system and browser.
cesium 1.63.1, ubuntu 18.04, chrome 78