CZML path colors


I need to colour CZML "path":

Case 1. Different path segments have different colors (as in "Polyline Color" Sandcastle example)

Case 2. Instead of cutting at "path.trailTime" it should fade out gradually.

My understanding is that neither is currently possible using CZML path.

I'm about to implement path segments as separate (poly)lines with time-dynamic "show" to simulate "path.trailTime" (and time-dynamic color to simulate fade effect for Case 2).

Can you propose a better solution?
I'm primarily concerned about performance as there could be multiple rather long paths.

Thank you.

What you’re proposing should perform very well. Just be sure to use linear interpolation for the entity position and set followSurface to false on the polyline, otherwise the entity won’t always line up with the polyline.

Unfortunately, while per-segment colors in the Entity API and CZML are on the roadmap, they are not near term.