Hi,
I’m trying to add multiple entities to a datasource, each one containing a polygon with an alpha value set, however when a new entity is added the alpha values for all the other polygons in the collection appear to flicker or flash to 100% briefly before returning to their original values.
var viewer = new Cesium.Viewer(‘cesiumContainer’);
var dataSource = new Cesium.CustomDataSource(‘Polygons’);
viewer.dataSources.add(dataSource);
var x = 0;
var y = 0;
setInterval(function(){
x += 5;
y += 2;
var area = [0 + y, 51 + x, 5 + y, 51 + x, 2.50 + y, 48 + x];
dataSource.entities.add({
name: ‘test’,
show : true,
polygon : {
hierarchy :{
positions: Cesium.Cartesian3.fromDegreesArray(area)
},
material : Cesium.Color.RED.withAlpha(0.5)
}
});
}, 1000);
``
In the full code being used in our application I’m trying to fade the polygons out over time (as per the advice in https://groups.google.com/forum/#!newtopic/cesium-dev/cesium-dev/kbTxKXbRF44) - but it still seems to occur when using a solid colour too.
Also from what I can tell this doesn’t appear to be the case for other types in an entity, for example polylines or billboards.
Many Thanks,
Oliver