Skip to content

Commit

Permalink
this works
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiel Byrne committed Sep 14, 2021
1 parent 55310c9 commit 3f1a9a3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ const edition = myArgs.length > 0 ? Number(myArgs[0]) : defaultEdition;
(() => {
buildSetup();
createFiles(edition);
// createMetaData();
createMetaData();
})();

30 changes: 15 additions & 15 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@
const layersOrder = [
{ name: 'nameplate', number: 1 },
// { name: 'background', number: 2 },
{ name: 'face', number: 3 },
{ name: 'hair', number: 4 },
{ name: 'moustache', number: 5 },
{ name: 'eyebrows', number: 6 },
{ name: 'goatee', number: 7 },
{ name: 'nose', number: 8 },
{ name: 'eyes', number: 9 },
{ name: 'teeth', number: 10 },
{ name: 'pupils', number: 11 },
{ name: 'lips', number: 12 },
{ name: 'blunt_body', number: 13 },
{ name: 'blunt_smoke', number: 14 },
{ name: 'face', number: 1 },
{ name: 'hair', number: 1 },
{ name: 'moustache', number: 1 },
{ name: 'eyebrows', number: 1 },
{ name: 'goatee', number: 2 },
{ name: 'nose', number: 1 },
{ name: 'eyes', number: 1 },
{ name: 'teeth', number: 1 },
{ name: 'pupils', number: 1 },
{ name: 'lips', number: 1 },
{ name: 'blunt_body', number: 4 },
{ name: 'blunt_smoke', number: 4 },
];

// const format = {
Expand All @@ -31,8 +31,8 @@ const layersOrder = [
// };

const format = {
width: 540,
height: 720
width: 540,// 10800,
height: 720// 14400
}

const rarity = [
Expand All @@ -41,6 +41,6 @@ const rarity = [
{ key: "_sr", val: "super rare" },
];

const defaultEdition = 12;
const defaultEdition = 4;

module.exports = { layersOrder, format, rarity, defaultEdition };
14 changes: 7 additions & 7 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,14 @@ const createFiles = edition => {
};

const createMetaData = () => {
// fs.stat(`${buildDir}/${metDataFile}`, (err) => {
// if(err == null || err.code === 'ENOENT') {
// fs.writeFileSync(`${buildDir}/${metDataFile}`, JSON.stringify(metadata, null, 2));
fs.stat(`${buildDir}/${metDataFile}`, (err) => {
if(err == null || err.code === 'ENOENT') {
fs.writeFileSync(`${buildDir}/${metDataFile}`, JSON.stringify(metadata, null, 2));
console.log(JSON.stringify(metadata, null, 2))
// } else {
// console.log('Oh no, error: ', err.code);
// }
// });
} else {
console.log('Oh no, error: ', err.code);
}
});
};

module.exports = { buildSetup, createFiles, createMetaData };

1 comment on commit 3f1a9a3

@vercel
Copy link

@vercel vercel bot commented on 3f1a9a3 Sep 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.