Hello.
I’m adding 300k points to cesium map by pointPrimitiveCollection. But it’s too slow to add them by position
, is there a parameter like positions
to pass an array of coords? or any other methods that add multiple points to a collection at once?
let points = viewer.scene.primitives.add(new Cesium.PointPrimitiveCollection());
for (let i = 0; i < message.data.position.length / 3; i++) {
let position = new Cesium.Cartesian3(message.data.position[3 * i], message.data.position[3 * i + 1], message.data.position[3 * i + 2]);
points.add({
position: position,
pixelSize : 2.0,
color : Cesium.Color.YELLOW,
});
}
Thanks!