First, clone the Generative Template on Github. It has everything you need to launch a new generative art collection.
Make sure that the following code snippet is in the <head> section of your index.html.
The following code snippet contains the seed variable and mathRand() function, which will be used to create randomness.
During development, mathRand() generates a random number locally on your computer. Once your code is deployed on-chain, mathRand() will use an on-chain seed instead of the local seed.