HashLips / generative-art-opensource

Create generative art by using the canvas api and node js, feel free to contribute to this repo with new ideas.
MIT License
1.36k stars 695 forks source link

How to get individual JSONs for each NFT? #146

Open seanpen00 opened 2 years ago

seanpen00 commented 2 years ago

I'm using the most recent branch of the generate-art-opensource repository. However, when I mint my NFTs, there is only one file titled "_metadata" instead of multiple .json files for each NFT. I want there to be a 1.json, 2.json, 3.json, etc.

How would I do this?

seanpen00 commented 2 years ago

I got this error when trying to copy and paste the two instances of saveMetaDataSingleFile from a previous branch into my code:

(node:19588) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined

gcod commented 2 years ago

This works with current main index.zip

jsvbugarin commented 2 years ago

i have tried this method, when i reach to 2k+ the program stops creating NFT idk why :( i just use ur index.zip

JuanDLRM commented 2 years ago

i have tried this method, when i reach to 2k+ the program stops creating NFT idk why :( i just use ur index.zip

Did you just copy and paste everything into main.js? or index.js?

gcod commented 2 years ago

index.js

I didn't try to make more than 1000 NFT but I don't see why it wouldn't work for more as long as you have enough layers to avoid having duplicated DNA.

You can just compare the difference with your code and grab only what you need.

jsvbugarin commented 2 years ago

its all good now thanks for support,

On Tue, Oct 19, 2021 at 10:59 PM gcod @.***> wrote:

index.js

I didn't try to make more than 1000 NFT but I don't see why it wouldn't work for more as long as you have enough layers to avoid having duplicated DNA.

You can just compare the difference with your code and grab only what you need.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/HashLips/generative-art-opensource/issues/146#issuecomment-946811836, or unsubscribe https://github.com/notifications/unsubscribe-auth/APTF3WHC4BEGKDPSPYPOFE3UHWBTHANCNFSM5ECU6PHQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.