I want to create an animation where balls fill the camera view, but I have struggled with positioning these objects. Is there some intelligent way to do this?
Here is the I created:
I want to achieve this result (screen filled with balls):
this demo uses cannon-es, also deals with responsiveness (resizing the window). it’s react, you’d need to go through cannons docs to figure out how to do it in vanilla, but it’s not that hard.