I am currently working on implementing the boids algorithm with three.js, and I've hit a roadblock when it comes to drawing the birds (or cubes in my case).
The issue I'm facing is that the screen is not clearing after redrawing, so the old cubes remain visible.
Below is the code snippet I'm using:
// Code snippet here
I've tried multiple solutions but can't seem to find one that works. Any help or guidance would be greatly appreciated!