bitcoin-nfts / bitcoin-colors

A sample NFT collection that shows the strong connection between Stacks and Bitcoin.
6 stars 2 forks source link

Generate random combinations of SVG layers #43

Closed whoabuddy closed 1 year ago

whoabuddy commented 1 year ago

This PR adds an SVG generator that:

Sample results below, generated images are stored in the generation/faces folder, which may need to be created first before running the script.

To run locally:

  1. Fork and clone the repo
  2. In the console, navigate to the generation/ folder
  3. Run npm i to install dependencies (@types/node, ts-node, typescript)
  4. Run npx ts-node generate-svgs.ts to run the script

The number of SVGs generated is set in the generate-svgs.ts file at the bottom, e.g. generateSVGs(5000);

image

Fixes #42

whoabuddy commented 1 year ago

Pushed some code on how I envision separating the traits / layers then creating an SVG as a result. First two below generated/saved by the script (note that I only have one option for the head right now):

bitcoin-faces-test

To use the script:

This will eventually output a set to a folder and make more advanced selections.