Hi there,
I’m loading some geoJSON data and would like to symbolize the data with an animated water material. When I run this code below, all I see is a white polygon. Am I missing something?
promise.then(function(dataSource) {
viewer.dataSources.add(dataSource);
var entities = dataSource.entities.values;
for (var i = 0; i < entities.length; i++) {
var entity = entities[i];
entity.polygon.outline = false;
/* entity.polygon.material = new Cesium.ImageMaterialProperty({
image: 'water.jpg',
alpha: 0.1
});
*/
entity.polygon.material = new Cesium.Material({
fabric: {
type: "Water",
uniforms: {
normalMap: "water.jpg",
frequency: 10000.0,
animationSpeed: 0.01,
amplitude: 1.0,
},
},
})
}
});```
Thanks in advance,
Mapper
PS I have also noticed when adding a color material:
entity.polygon.material = new Cesium.ColorTypeMaterial({
fabric: {
type: 'Color',
uniforms: {
color: new Cesium.Color(1.0, 1.0, 0.0, 1.0)
}
}
});
Polygons are also rendered white. It seems this code is getting ignored?