Closed Th3HotDog closed 2 years ago
After changing the editionSize to 10 did you change the values of rarities as well? Refer to issue #62 for more info. Also make sure the names of the layers and folders match. You couldve missed an upper case letter or something
So here are my layers, they seem to check out to me. The only other thing is I couldn't get the 'yarn add all' commad to work. Could that be it? I can get the code to run just fine without doing that.
And my rarity issue I think is fine too.
So after playing around with it more, I've found that when I remove the files from the 'input' folder titled 'ball' for example. It will always look for ball and not take what I give it. Why is that? Is there are a dir path pointed at the examples in the code?
Same problem
Found anything yet?
Nope please let me know if you do. I've been looking and nothing...
Maybe those files have to stay in there? And you just remove them from the layers? So they don't show.
did you solve it?
Keep getting this error when I run the code using "node index.js". I'm not sure what to do here. I tried to look for a path but didn't really see much. I'm also really new to coding so. Any help would be much appreciated. I have made sure the folders had a, "orignal", "rare", and super_rare" sub directories with images inside. The code runs fine obviously without any edits.
The only thing I have changed in the code is the editionSize to 10 and edited the code to read:
// create required layers // for each layer, call 'addLayer' with the id and optionally the positioning and size // the id would be the name of the folder in your input directory, e.g. 'ball' for ./input/ball const layers = [ addLayer('Body', { x: 0, y: 0 }, { width: width, height: height }), addLayer('Claws'), addLayer('Coat Color'), addLayer('Eyes') ];
// provide any specific percentages that are required for a given layer and rarity level // all provided options are used based on their percentage values to decide which layer to select from addRarityPercentForLayer('super_rare', 'Body', { 'super_rare': 33, 'rare': 33, 'original': 33 }); addRarityPercentForLayer('super_rare', 'Claws', { 'super_rare': 50, 'rare': 25, 'original': 25 }); addRarityPercentForLayer('original', 'Claws', { 'super_rare': 50, 'rare': 25, 'original': 25 });