You can click anywhere on the canvas to shoot more boxes.
The voronoi diagram is calculated on-the-fly in real-time, and the number of sites is randomized using a random point spray.
Obviously it's not the most efficient way to do that but for the purpose of this demo it is fast enough.
NOTE: This demo is just a simple poc tech demo, might invest more in the future to make this code better written. but for the time being this is just a research/poc/educational project.
Can be found on my Github.
This demo uses matter.js 2D physics engine and Javascript-Voronoi library by gorhill for calculating the voronoi diagram..