Skip to content

Instantly share code, notes, and snippets.

@YousefED
Created December 10, 2016 01:14
Show Gist options
  • Save YousefED/092aa2e48ca8ac4518b5b5c39e1c1682 to your computer and use it in GitHub Desktop.
Save YousefED/092aa2e48ca8ac4518b5b5c39e1c1682 to your computer and use it in GitHub Desktop.
var viewer = new Cesium.Viewer('cesiumContainer');
var lines = viewer.scene.primitives.add(new Cesium.PolylineCollection());
for(var i = 0; i < 1000; i++) {
var positions = [-75+i, 35, -60, 40];
lines.add({
positions: Cesium.Cartesian3.fromDegreesArray(positions),
material: Cesium.Material.fromType(Cesium.Material.PolylineGlowType, {
glowPower: 0.05,
color: Cesium.Color.RED
}),
width: 10.0
});
}
@keikland
Copy link

Have you tried suspendEvents() - loop to add lines - resumeEvents()? It can make a big difference.
Kjell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment