Skip to content

Commit 351d648

Browse files
author
Daniel Botha
committed
Updated readme
1 parent c112785 commit 351d648

5 files changed

Lines changed: 11 additions & 6 deletions

File tree

.DS_Store

0 Bytes
Binary file not shown.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ The program will output all the images in the `build` directory along with the m
118118
"description": "This is the description of your NFT project",
119119
"image": "https://hashlips/nft/1.png",
120120
"edition": 1,
121-
"date": 1631690799975,
121+
"date": 1731990799975,
122122
"attributes": [
123123
{ "trait_type": "Background", "value": "Black" },
124124
{ "trait_type": "Eyeball", "value": "Red" },

layers/.DS_Store

6 KB
Binary file not shown.

layers/Goo/Green#1.png

55.3 KB
Loading

src/main.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,13 @@ const startCreating = async () => {
184184
let layerConfigIndex = 0;
185185
let editionCount = 1;
186186
let failedCount = 0;
187-
layerConfigurations.forEach(async (layerConfig) => {
188-
const layers = layersSetup(layerConfig.layersOrder);
189-
while (editionCount <= layerConfig.growEditionSizeTo) {
187+
while (layerConfigIndex < layerConfigurations.length) {
188+
const layers = layersSetup(
189+
layerConfigurations[layerConfigIndex].layersOrder
190+
);
191+
while (
192+
editionCount <= layerConfigurations[layerConfigIndex].growEditionSizeTo
193+
) {
190194
let newDna = createDna(layers);
191195
if (isDnaUnique(dnaList, newDna)) {
192196
let results = constructLayerToDna(newDna, layers);
@@ -221,13 +225,14 @@ const startCreating = async () => {
221225
failedCount++;
222226
if (failedCount >= uniqueDnaTorrance) {
223227
console.log(
224-
`You need more layers or elements to grow your edition to ${layerConfig.growEditionSizeTo} artworks!`
228+
`You need more layers or elements to grow your edition to ${layerConfigurations[layerConfigIndex].growEditionSizeTo} artworks!`
225229
);
226230
process.exit();
227231
}
228232
}
229233
}
230-
});
234+
layerConfigIndex++;
235+
}
231236
writeMetaData(JSON.stringify(metadataList));
232237
};
233238

0 commit comments

Comments
 (0)