Streaming animation

Hello all,

Been working a little more with the cesium stuff now - for those that remember I was hoping to do WFS-T in cesium / OL branch. I have moved away from that now as priorities changed.

What I am wondering now is how I can create my own animation for a polygon. The same way that animation sandcastle demo does the “height” or “dissolve” animation with a polygon, what I am after is basically a “swipe” animation from top to bottom. Where the polygon slowly decreases in height (the top edge moves downwards) and finally disappears. The idea is that we show a sort of “streaming” animation. What I am doing is loading a WMS layer behind the polygon and that then looks like the imagery is streaming in.

Really ugly hack I know but it’s a ridiculous requirement I’ve been tasked with.

So, anyone got any ideas?

Thanks all.



You could write your own animations; all the animations do is change properties on the polygon over time. For your case, it sounds like you can just use multiple animations at the same time, e.g. start with something like:

scene.getAnimations().addProperty(primitive, ‘height’, 5000000.0, 0.0);

scene.getAnimations().addAlpha(primitive.material, 0.5, 0.0);

You may also be interested in the final optional argument which is an object literal with properties for delaying the animation, e.g., if you want the fade to start after the polygon is already dropping, and changing the easing function, i.e., the function that controls the rate of change, and an onComplete callback to remove the primitive after the animation. There isn’t much doc for this yet, but the code in AnimationCollection.js is easy to read.