From
new Cesium.PolylineGlowMaterialProperty({
glowPower: 0.15,
color: Cesium.Color.fromCssColorString("rgba(42,92,170, 0.15)")
});
To
new Cesium.PolylineGlowMaterialProperty({
glowPower: 0.3,
color: Cesium.Color.fromCssColorString("rgba(255,255,255, 0.15)")
});
Is there a way to change all the materials as a whole?
I think you'll need to loop through all the entities, but you probably don't want to allocate a new PolylingGlowMaterial
for each one, as that could be slow. Instead, try changing the value on the existing material. Assuming this is a "constant" (non-time-varying) property as shown above, there's a setValue
available. It goes something like this:
entity.polyline.material.glowPower.setValue(0.3);
entity.polyline.material.color.setValue(Cesium.Color.WHITE.withAlpha(0.15));
I've also shown a different way to get the same color here, without asking Cesium to parse 10000 color strings. If all 10000 entities are the same color, you should allocate this color before the loop starts, and just hand out thousands of references to it, rather than redoing it in the loop.