Changing the color of a polygon overtime.

Hi Fred,

I’m glad you like the API! We’re incredibly happy with the community of users that has built around it. :slight_smile:

As for your color animation, the flicker is caused because your geometry is being drawn asynchronously. To remove the flicker, you want to update the color per frame as opposed to at some interval. I think using a CallbackProperty would work well in your case. You define a function that is called every frame to get the new update value. Passing in false for isConstant will tell Cesium to draw the polyline synchronously, and that will get rid of the flickering.

Here’s a short example of color animation with a CallbackProperty: http://cesiumjs.org/Cesium/Apps/Sandcastle/?src=Hello%20World.html&label=Showcases&gist=635b076158394095e4a4cfa7b0cb78a6

By the way, did you know that you can paste code into Sandcastle and save a link to your example by hitting the Share button at the top? This will save your code as a gist – it’s how I’m sharing the above link. Hopefully that will make it easier for you to share code in the future.

Hope that helps!

  • Rachel