Skip to content

Commit b1bb8e3

Browse files
author
“danielebotha”
committed
Cleaned the old code
1 parent 60380cd commit b1bb8e3

File tree

1 file changed

+0
-112
lines changed

1 file changed

+0
-112
lines changed

input/config.js

Lines changed: 0 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -110,115 +110,3 @@ module.exports = {
110110
endEditionAt,
111111
rarityWeights,
112112
};
113-
const fs = require("fs");
114-
const width = 1000;
115-
const height = 1000;
116-
const dir = __dirname;
117-
const description = "This is an NFT made by the coolest generative code.";
118-
const baseImageUri = "https://hashlips/nft";
119-
const startEditionFrom = 1;
120-
const endEditionAt = 10;
121-
const editionSize = 10;
122-
const rarityWeights = [
123-
{
124-
value: "super_rare",
125-
from: 1,
126-
to: 1,
127-
},
128-
{
129-
value: "rare",
130-
from: 2,
131-
to: 5,
132-
},
133-
{
134-
value: "original",
135-
from: 5,
136-
to: editionSize,
137-
},
138-
];
139-
140-
const cleanName = (_str) => {
141-
let name = _str.slice(0, -4);
142-
return name;
143-
};
144-
145-
const getElements = (path) => {
146-
return fs
147-
.readdirSync(path)
148-
.filter((item) => !/(^|\/)\.[^\/\.]/g.test(item))
149-
.map((i) => {
150-
return {
151-
name: cleanName(i),
152-
path: `${path}/${i}`,
153-
};
154-
});
155-
};
156-
157-
const layers = [
158-
{
159-
elements: {
160-
original: getElements(`${dir}/ball/original`),
161-
rare: getElements(`${dir}/ball/rare`),
162-
super_rare: getElements(`${dir}/ball/super_rare`),
163-
},
164-
position: { x: 0, y: 0 },
165-
size: { width: width, height: height },
166-
},
167-
{
168-
elements: {
169-
original: getElements(`${dir}/eye color/original`),
170-
rare: getElements(`${dir}/eye color/rare`),
171-
super_rare: getElements(`${dir}/eye color/super_rare`),
172-
},
173-
position: { x: 0, y: 0 },
174-
size: { width: width, height: height },
175-
},
176-
{
177-
elements: {
178-
original: getElements(`${dir}/iris/original`),
179-
rare: getElements(`${dir}/iris/rare`),
180-
super_rare: getElements(`${dir}/iris/super_rare`),
181-
},
182-
position: { x: 0, y: 0 },
183-
size: { width: width, height: height },
184-
},
185-
{
186-
elements: {
187-
original: getElements(`${dir}/shine/original`),
188-
rare: getElements(`${dir}/shine/rare`),
189-
super_rare: getElements(`${dir}/shine/super_rare`),
190-
},
191-
position: { x: 0, y: 0 },
192-
size: { width: width, height: height },
193-
},
194-
{
195-
elements: {
196-
original: getElements(`${dir}/bottom lid/original`),
197-
rare: getElements(`${dir}/bottom lid/rare`),
198-
super_rare: getElements(`${dir}/bottom lid/super_rare`),
199-
},
200-
position: { x: 0, y: 0 },
201-
size: { width: width, height: height },
202-
},
203-
{
204-
elements: {
205-
original: getElements(`${dir}/top lid/original`),
206-
rare: getElements(`${dir}/top lid/rare`),
207-
super_rare: getElements(`${dir}/top lid/super_rare`),
208-
},
209-
position: { x: 0, y: 0 },
210-
size: { width: width, height: height },
211-
},
212-
];
213-
214-
module.exports = {
215-
layers,
216-
width,
217-
height,
218-
description,
219-
baseImageUri,
220-
editionSize,
221-
startEditionFrom,
222-
endEditionAt,
223-
rarityWeights,
224-
};

0 commit comments

Comments
 (0)