Open AllHighOnly opened 2 years ago
The code: `const fs = require("fs"); const width = 512; const height = 512; const dir = __dirname; const description = "This is an NFT made by the coolest generative code."; const baseImageUri = "https://hashlips/nft"; const startEditionFrom = 1; const endEditionAt = 100; const editionSize = 100; const raceWeights = [ { value: "skull", from: 1, to: editionSize, }, ];
const races = {
skull: {
name: "Skull",
layers: [
{
name: "Suit",
elements: [
{
id: 0,
name: "Regular",
path: ${dir}/2-suit/Pig_Main_body_white.png
,
weight: 100,
},
],
position: { x: 0, y: 0 },
size: { width: width, height: height },
},
{
name: "Facial hair",
elements: [
{
id: 0,
name: "No facial hair",
path: ${dir}/6-facial-hair/NoFacialHair.png
,
weight: 31,
},
{
id: 0,
name: "Beard",
path: ${dir}/6-facial-hair/Pig_beard.png
,
weight: 32,
},
{
id: 0,
name: "Moustache",
path: ${dir}/6-facial-hair/Pig_moustache.png
,
weight: 34,
},
],
position: { x: 0, y: 0 },
size: { width: width, height: height },
},
{
name: "Accessories",
elements: [
{
id: 0,
name: "No accessories",
path: ${dir}/9-accessories/NoAcc.png
,
weight: 18,
},
{
id: 0,
name: "Phone",
path: ${dir}/9-accessories/Pig_phone.png
,
weight: 19,
},
{
id: 0,
name: "Flower_red",
path: ${dir}/9-accessories/Pig_flower_red.png
,
weight: 20,
},
{
id: 0,
name: "Flower_yellow",
path: ${dir}/9-accessories/Pig_flower_yellow.png
,
weight: 21,
},
{
id: 0,
name: "Sigaret",
path: ${dir}/9-accessories/Pig_sigaret.png
,
weight: 22,
},
],
position: { x: 0, y: 0 },
size: { width: width, height: height },
},
{
name: "Headwear",
elements: [
{
id: 0,
name: "Bandana",
path: ${dir}/10-headwear/Pig_bandana_main.png
,
weight: 7,
},
{
id: 0,
name: "Hat",
path: ${dir}/10-headwear/Pig_hat_main.png
,
weight: 8,
},
{
id: 0,
name: "Hat_Dollar",
path: ${dir}/10-headwear/Pig_hat_dollar.png
,
weight: 9,
},
{
id: 0,
name: "Hat_pig_sign",
path: ${dir}/10-headwear/Pig_hat_pig_sign.png
,
weight: 10,
},
{
id: 0,
name: "Hat2_Dollar",
path: ${dir}/10-headwear/Pig_hat2_dollar.png
,
weight: 11,
},
{
id: 0,
name: "Hat2_red_Dollar",
path: ${dir}/10-headwear/Pig_hat2_red_dollar.png
,
weight: 12,
},
{
id: 0,
name: "Hat2",
path: ${dir}/10-headwear/Pig_hat2.png
,
weight: 13,
},
{
id: 0,
name: "Hat2_red",
path: ${dir}/10-headwear/Pig_hat2_red.png
,
weight: 14,
},
{
id: 0,
name: "Witch_hat",
path: ${dir}/10-headwear/Pig_witch_hat_main.png
,
weight: 16,
},
],
position: { x: 0, y: 0 },
size: { width: width, height: height },
},
],
},
};
module.exports = { width, height, description, baseImageUri, editionSize, startEditionFrom, endEditionAt, races, raceWeights, }; ` @HashLips sorry for mention, but i really need help
Did you fix this i am having same issue?
I always get DNA exists after the code generates 1 image, i have set all weights to random weights, nothing is the same, everything adds up to 100... still doesn't help. I have saved it after this, doesn't work