mirror of
https://github.com/LucasDower/ObjToSchematic.git
synced 2024-12-03 02:39:59 +08:00
Fix atlas and palette scripts
This commit is contained in:
parent
0fa6be0a7b
commit
3f8cc524ce
@ -343,14 +343,14 @@ async function buildAtlas() {
|
||||
|
||||
|
||||
log(LogStyle.Info, 'Exporting...');
|
||||
const atlasDir = path.join(__dirname, `../resources/atlases/${atlasName}.png`);
|
||||
const atlasDir = path.join(__dirname, `../../resources/atlases/${atlasName}.png`);
|
||||
outputImage.save(atlasDir);
|
||||
log(LogStyle.Success, `${atlasName}.png exported to /resources/atlases/`);
|
||||
const outputJSON = {
|
||||
atlasSize: atlasSize,
|
||||
blocks: allModels,
|
||||
};
|
||||
fs.writeFileSync(path.join(__dirname, `../resources/atlases/${atlasName}.atlas`), JSON.stringify(outputJSON, null, 4));
|
||||
fs.writeFileSync(path.join(__dirname, `../../resources/atlases/${atlasName}.atlas`), JSON.stringify(outputJSON, null, 4));
|
||||
log(LogStyle.Success, `${atlasName}.atlas exported to /resources/atlases/\n`);
|
||||
|
||||
/* eslint-disable */
|
||||
|
@ -7,7 +7,7 @@ import prompt from 'prompt';
|
||||
void async function main() {
|
||||
log(LogStyle.Info, 'Creating a new palette...');
|
||||
|
||||
const paletteBlocksDir = path.join(__dirname, './new-palette-blocks.txt');
|
||||
const paletteBlocksDir = path.join(__dirname, '../../tools/new-palette-blocks.txt');
|
||||
if (!fs.existsSync(paletteBlocksDir)) {
|
||||
log(LogStyle.Failure, 'Could not find /tools/new-palette-blocks.txt');
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user