On my globe I am, on load, drawing about 5 primitives (billboard, labels etc).
Then, on a set interval, I use the position of a satellite, say, and calculate the footprint as a polyline (as I can’t seem to figure out how to draw a polygon with no fill but just an outline). This polyline I add with primitives.add(footprint).
The problem with this is that after a while I have hundreds of _primitives loaded, and it slows the viewer down massively.
What is the best way to update the polyline collection / primitives?
var primitives = scene.getPrimitives();
var footprintLines = new Cesium.PolylineCollection();
var satelliteLocation = xyz;
frame = calculatedfromxyz;
var footprint = footprintLines.add();
I can see that there is an ‘update’ function on the primitives but unsure how to use it.
Thanks for any help.