var viewer = new Cesium.Viewer('cesiumContainer'); viewer.entities.add({ polyline : { positions : Cesium.Cartesian3.fromDegreesArrayHeights([-75, 39, 250000, -125, 39, 250000]), width : 5, material : new Cesium.PolylineOutlineMaterialProperty({ color : new Cesium.CallbackProperty( function (time, result){ return Cesium.Color.fromAlpha( Cesium.Color.RED, (new Date(time).getTime() % 1000) / 1000, result); }, false), outlineWidth : 2, outlineColor : Cesium.Color.BLACK }) } }); viewer.zoomTo(viewer.entities);
Cesiumjs – How to Animating polyline color
Leave a reply