I am implementing a shape drawer for Cesium. It was suggested on another forum post to utilize a CesiumCallback property when creating the dynamic shapes so that they can be smoothly drawn. I have this part figured out. For performance reasons, I am assuming it is better to make the CallbackProperty a constant property after finishing drawing. I am not sure the proper way to do this though. Each way that I have tried results in a flickering or flashing of the shape once.
As an exmaple, below is a code snipets of what I've done.
//Creation of polyline
var polyline = new Cesium.Entity({
polyline : {
positions : new Cesium.CallbackProperty(getPolylinePositions, false),
}
});
The getPolylinePositions callback function returns an array of vector3 values, which polyline.positions is expecting.
When it comes to changing the polyline's position array from being populated by a async callback property to a constant value, how can this be done without the shape flickering?
I can provide a sandcastle example of the flickering if necessary, but if someone else has been able to solve this issue let me know. Thanks!