Position objects in front of camera

Hello ThreeJS people :vulcan_salute:

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):

your best bet could be physics since positioning them otherwise will most likely look a bit static.

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.