Up until this point, the snowflakes in the application were generated completely randomly based on JS’s random number generator. Unfortunately, this random number generator cannot be manually seeded, which means that the results of the art cannot be influenced meaningfully. But wait: isn’t the point of generative art to introduce randomness?
Yes! ...but sometimes it’s useful to be able to have a method to reproduce a certain result. We can do this by seeding a random number generator with a value we define ourselves. A defined seed will cause the random number generator to produce a sequence of consistent values, which in turn produces the same “random” results every time. You can read more about seeding here.
In the case of this application, we wanted to be able to provide a seed to the code to produce unique snowflake combinations based on the entered value. For instance, entering your own name as the seed produces a piece of art that is unique to your name, adding an interesting aspect of personalization to the project.
Since vanilla JS does not have a manually seed-able random number generator, I used seedrandom.js instead.