I am placing a variable number of circles on the screen.
var radius = 1;
var segments = 32;
var circleGeometry = new THREE.CircleGeometry( radius, segments);
function generateCircles(){
//scene.remove(circle);
var count=0;
while (1000> count) {
circle = new THREE.Mesh (circleGeometry, material);
scene.add (circle);
count ++;
}
}
Is this approach efficient?
Whenever I call this function in my code, it slows down each time. I believe this is due to the increasing number of objects in the scene. How can I address this issue?
Every time the function is invoked, I need to completely remove the generated circles from the memory stage.