Skip to content

Commit d95f75b

Browse files
author
Daniel Botha
committed
Updated: config structure
1 parent e8ddd19 commit d95f75b

2 files changed

Lines changed: 5 additions & 17 deletions

File tree

src/config.js

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,7 @@ const baseUri = "https://hashlips/nft";
44

55
const layerConfigurations = [
66
{
7-
layerEditionSize: 10,
8-
layersOrder: [
9-
{ name: "Background" },
10-
{ name: "Eyeball" },
11-
{ name: "Eye color" },
12-
{ name: "Iris" },
13-
{ name: "Shine" },
14-
{ name: "Bottom lid" },
15-
{ name: "Top lid" },
16-
],
17-
},
18-
{
19-
layerEditionSize: 30,
7+
growEditionSizeTo: 10,
208
layersOrder: [
219
{ name: "Background" },
2210
{ name: "Eyeball" },
@@ -29,8 +17,6 @@ const layerConfigurations = [
2917
},
3018
];
3119

32-
const rarityDelimiter = "#";
33-
3420
const format = {
3521
width: 512,
3622
height: 512,
@@ -41,6 +27,8 @@ const background = {
4127
brightness: "80%",
4228
};
4329

30+
const rarityDelimiter = "#";
31+
4432
const uniqueDnaTorrance = 10000;
4533

4634
module.exports = {

src/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ const startCreating = async () => {
186186
let failedCount = 0;
187187
layerConfigurations.forEach(async (layerConfig) => {
188188
const layers = layersSetup(layerConfig.layersOrder);
189-
while (editionCount <= layerConfig.layerEditionSize) {
189+
while (editionCount <= layerConfig.growEditionSizeTo) {
190190
let newDna = createDna(layers);
191191
if (isDnaUnique(dnaList, newDna)) {
192192
let results = constructLayerToDna(newDna, layers);
@@ -221,7 +221,7 @@ const startCreating = async () => {
221221
failedCount++;
222222
if (failedCount >= uniqueDnaTorrance) {
223223
console.log(
224-
`You need more layers or elements to generate ${layerConfig.layerEditionSize} artworks!`
224+
`You need more layers or elements to grow your edition to ${layerConfig.growEditionSizeTo} artworks!`
225225
);
226226
process.exit();
227227
}

0 commit comments

Comments
 (0)