Sometime between Cesium-1.29 and the latest 1.35 a change was made which introduced a flicker when adding a bunch of labels to the scene. The following code snippet can be dropped into SandCastle and demonstrates the issue.
// Cesium.CesiumWidget is similar to Cesium.Viewer, but
// is trimmed down. It is just a widget for the 3D globe;
// it does not include the animation, imagery selection,
// and other widgets, nor does it depend on the third-party
// Knockout library.
var widget = new Cesium.CesiumWidget('cesiumContainer', {
terrainProvider : new Cesium.CesiumTerrainProvider({
url : ‘https://assets.agi.com/stk-terrain/v1/tilesets/world/tiles’,
requestWaterMask : true,
requestVertexNormals : true
})
});
var count = null;
var drawLabelCollection = null;
var scene = widget.scene;
var x = null;
var y = null;
setTimeout(function() {
for(x = -180; x < 180; x=x+5) {
for(y = -90; y < 90; y=y+5) {
drawLabelCollection = new Cesium.LabelCollection();
drawLabelCollection.add({
font: 'bold 15px Arial, sans-serif',
horizontalOrigin: Cesium.HorizontalOrigin.LEFT,
position: Cesium.Cartesian3.fromDegrees(x, y, 500),
text: '(' + x + ', ' + y + ')',
verticalOrigin: Cesium.VerticalOrigin.BOTTOM
});
scene.primitives.add(drawLabelCollection);
count++;
}
}
console.warn('Done ' + count);
}, 5000);
Any idea what would cause the imagery layer flicker?
Thanks
Jerrold S