This repository is contains a few key pieces of functionality for developing generative art for the Artblocks.io platform. The goal of this starter is to encourage rapid iteration, fluid development, and inexpensive deployments to the blockchain.
In production your project will get a predetermined seed from the TX Hash. This will ultimately determine the unique composition of your artwork via the PRNG.
In development, it is useful to lock the random seed in order to reproduce the artwork and iterate. Eventually this is how your project will work in production.
In order to quickly iterate this starter pack comes bundled with Webpack's dev server.
In order to minimize gas fees this start pack has pre-built solutions to reduce filesize and split the production bundle in to 10kb chunks (a requirement of Artblocks.)
- Clone the repository
- Run
npm i
in your project folder - Run
rpm run start
in your project folder - Edit
src/sketch.js
to begin working on your project.
- Run
npm run build
in your project folder - Open
dist/main.js
and find methods/variables that havent been minified already. These can be further packed down. - Add them to
replace.config.json
- Run
npm run split
- You will now have your chunked project scripts in
dist
, upload these to your project shell.
A. Either is fine, I like the P5 version a little more.
A. In a future update I'll include boilerplate for this