-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding an ["occurenceLimiter"] object to layersSetup #918
Comments
@marcneagu I think either thePeanutGalleryandCo's repo or nftchef's repo have this. |
They have something else...not a function that limits the occurrences of files in a folder |
@marcneagu on thePeanutGalleryandCo’s repo, there is a |
Thank you @bolshoytoster ! And if i set it under a certain layer, it works just fine, but I have to specify each layer in the "Main body" folder. When you have a few thousands of them, it's a lot of work.
It would be nice if it would work with the hole folder, like this:
], Any thoughts @thepeanutgalleryandco ? |
did you try generating with that config? |
Yes I did. And it returns duplicates |
Hey, guys! Is there possible to add a new object in the const layersSetup? I need to add something that limits to 1 (or 2,3, etc.) the occurrences of items in a SPECIFIC folder. For example, if I have a folder with 1000 images and I want all of them to appear in my final NFT.
Example:
main.js
const layersSetup = (layersOrder) => {
const layers = layersOrder.map((layerObj, index) => ({
id: index,
elements: getElements(
${layersDir}/${layerObj.name}/
),occurrenceLimiter:
layerObj.options?.["occurrenceLimiter"] != undefined
? layerObj.options?.["occurrenceLimiter"]
: true,
config.js
growEditionSizeTo: 150,
layersOrder: [
{ name: "Background" },
{ name: "Head" },
{ name: "Eyes", options: {occurrenceLimiter: "1",}, },
{ name: "Mouth" },
{ name: "Eyeswear" },
{ name: "Headwear", options: { blend: MODE.overlay, opacity: 0.7 }, },
{ name: "AlienHeadwear" },
],
},
];
The text was updated successfully, but these errors were encountered: