-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactored into npm package and global cmd alias
- Loading branch information
Showing
11 changed files
with
143 additions
and
1,006 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/env node | ||
|
||
// https://github.com/cpietsch/vikus-viewer-script | ||
// by Christopher Pietsch 2020 | ||
const textures = require("../src/textures.js"); | ||
|
||
const argv = require("yargs") | ||
.usage("Usage: vikus-viewer-script \"/path/to/large/images/*.jpg\" [options]") | ||
.command("\"/path/to/large/images/*.jpg\"", "Glob to input images") | ||
.example("vikus-viewer-script \"/path/to/large/images/*.jpg\"", "create VV textures from jpgs") | ||
.demandCommand(1) | ||
.describe("output", "Path to output folder") | ||
.default("output", "./data") | ||
.describe("skip", "Don't regenerate existing textures") | ||
.default("skip", true) | ||
.describe("textureFormat", "Texture image format") | ||
.default("textureFormat", "jpg") | ||
.describe("textureQuality", "Texture image quality (0-100)") | ||
.default("textureQuality", 60) | ||
.describe("spriteSize", "Resolution of images for spritesheets") | ||
.default("spriteSize", 256) | ||
.describe("spriteQuality", "Quality of jpg compression for spritesheets (0-100)") | ||
.default("spriteQuality", 70) | ||
.describe("spriteFormat", "spritesheets format (jpg or png)") | ||
.default("spriteFormat", "jpg") | ||
.describe("largeSize", "resolution of full sized images") | ||
.default("largeSize", 4096) | ||
.describe("mediumSize", "resolution of images loaded on the fly") | ||
.default("mediumSize", 1024) | ||
.help("h") | ||
.alias("h", "help").argv; | ||
|
||
// console.log('starting with', argv); | ||
|
||
const inputPath = argv._[0]; | ||
|
||
(async function main() { | ||
await textures.run(inputPath, argv) | ||
})(); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.