As seeds get larger and larger, the Voronoi cells become more and more square. I'm not sure where the exact cutoff is, but after some trial and error, I settled on 1024 as a safe maximum seed.
I suspect this is caused by the ValueNoise3D function, which generates some very large integers as an intermediate step. On most platforms, these integers will cap out or wrap around if they overflow, but in JavaScript, ints are stored as 64-bit floating point numbers, which lose precision above 2^53. My guess is that once too much precision is lost, the center points all end up at (0, 0, 0) within their respective cells.
As seeds get larger and larger, the Voronoi cells become more and more square. I'm not sure where the exact cutoff is, but after some trial and error, I settled on 1024 as a safe maximum seed.
I suspect this is caused by the
ValueNoise3Dfunction, which generates some very large integers as an intermediate step. On most platforms, these integers will cap out or wrap around if they overflow, but in JavaScript, ints are stored as 64-bit floating point numbers, which lose precision above 2^53. My guess is that once too much precision is lost, the center points all end up at (0, 0, 0) within their respective cells.