When displaying simple polylines with colors, displaying 1000 lines in white works normally.
But displaying different colors on the lines, the globe is not responsive to panning or zooming.
//Code used in sandcastle….
for(var i = 0; i < 1000; i++)
{
var polyline = polylines.add();
polyline.setPositions(ellipsoid.cartographicArrayToCartesianArray([
Cesium.Cartographic.fromDegrees(-110.0 + i * .01, -42.0 + i * .1),
Cesium.Cartographic.fromDegrees(-120.0 + i * .01, -26.0 + i * .1)
]));
var newColorMat = Cesium.Material.fromType(undefined, Cesium.Material.ColorType);
newColorMat.uniforms.color = new Cesium.Color(i/1000, 1, i/1000, 1.0);
polyline.setMaterial(newColorMat);
}
Is there a better way to display colored lines ( a lot of them) where the globe will be more responsive…