jalagar / animated-art-engine

A generative engine that takes various png layers on a sprite sheet format, combines them and then converts them into a .gif file
MIT License
166 stars 64 forks source link

Error with the Make Rarity #156

Closed NLC1609 closed 1 year ago

NLC1609 commented 1 year ago

This is an amazing open source project. Thanks for making it. I am having a few issues, pls help Thanks

rarityData.js:132 rarityDataTraits.elements.forEach((rarityDataTrait) => { ^

TypeError: Cannot read properties of undefined (reading 'elements')

jalagar commented 1 year ago

Hi glad you like it. @NLC1609 did you run make all first?

NLC1609 commented 1 year ago

step2_spritesheet_to_generative_sheet && node utils/rarityData.js && cd . Yes I did, Idk why it doesnt work.

jalagar commented 1 year ago

Do you have the build/json folder outputted? make rarity reads the _metadata.json in that folder

NLC1609 commented 1 year ago

"dna": "74536cc2a3a347cda0de076243744d5c283d270cbdfd23d9ea7423913400d264", "name": "#0", "description": "NFTTest", "image": "ipfs://123/0.gif", "imageName": "0.gif", "edition": 0, "date": 1666588898481, "attributes": [ { "trait_type": "output", "value": "Background" }, { "trait_type": "Background", "value": "Star_Night" }, { "trait_type": "Shirt", "value": "Open_White_Shirt" }, { "trait_type": "Head", "value": "Tennis_Ball_Head" }, { "trait_type": "Hat", "value": "Spartan_Helmet" }, { "trait_type": "Hand", "value": "Gold_Hand" }, { "trait_type": "Cosmetics", "value": "Phone" } ], "compiler": "Jalagar Animated Art Engine"

NLC1609 commented 1 year ago

This is it

Thanks for your help

NLC1609 commented 1 year ago

Yes and the .json files have been generated

{ "dna": "96a5886abf1db7b26f9dd2472c68d81b0c9d77d1fdf375e4462b7f3831013e65", "name": "#146", "description": "TestNFT", "image": "ipfs://123/146.gif", "imageName": "146.gif", "edition": 146, "date": 1666589390057, "attributes": [ { "trait_type": "output", "value": "Background" }, { "trait_type": "Background", "value": "Sunrise" }, { "trait_type": "Shirt", "value": "Bitcoin_Jacket" }, { "trait_type": "Head", "value": "Tennis_Ball_Head" }, { "trait_type": "Hat", "value": "Winter_Hat" }, { "trait_type": "Hand", "value": "White_Hand" }, { "trait_type": "Cosmetics", "value": "Phone" } ], "compiler": "Jalagar Animated Art Engine" }

jalagar commented 1 year ago

Is there a _metadata.json file? I'm not sure what is going on, it should work if ALL the JSON were generated. Can you try with a smaller collection size (and smaller heigh/width) and screenshot the JSON files that were generated?

jalagar commented 1 year ago

Closing let me know on Discord if you have any other issues