viewer.scene.primitives.remove(primitive);
primitive = viewer.scene.primitives.add(
new Cesium.Primitive({
geometryInstances: new Cesium.GeometryInstance({
geometry: new Cesium.PolylineGeometry({
positions: Cesium.Cartesian3.fromDegreesArrayHeights(arrs),
width: 2,
}),
}),
appearance: new Cesium.PolylineMaterialAppearance({
material: Cesium.Material.fromType(Cesium.Material.PolylineDashType, {
color: Cesium.Color.WHITE, // 线条颜色
}),
}),
})
);
the code above is in a mousemove event to draw a dynamic polyline,but it is delayed and when mouse moved quickly the primitive even disappeared! what should i do? I just want to make a tool to draw a dynamic polyline