mirror of
https://github.com/CesiumGS/obj2gltf.git
synced 2024-11-23 08:34:14 -05:00
Support quantize option
This commit is contained in:
parent
1b78afd6eb
commit
d4131a956c
@ -20,6 +20,7 @@ var objFile = defaultValue(argv._[0], defaultValue(argv.i, argv.input));
|
||||
var outputPath = defaultValue(argv._[1], defaultValue(argv.o, argv.output));
|
||||
var binary = defaultValue(defaultValue(argv.b, argv.binary), false);
|
||||
var embed = defaultValue(defaultValue(argv.e, argv.embed), false);
|
||||
var quantize = defaultValue(defaultValue(argv.q, argv.quantize), false); // Undocumented option
|
||||
|
||||
if (!defined(objFile)) {
|
||||
throw new Error('-i or --input argument is required. See --help for details.');
|
||||
@ -29,7 +30,8 @@ console.time('Total');
|
||||
|
||||
var options = {
|
||||
binary : binary,
|
||||
embed : embed
|
||||
embed : embed,
|
||||
quantize : quantize
|
||||
};
|
||||
|
||||
convert(objFile, outputPath, options, function() {
|
||||
|
@ -12,6 +12,7 @@ module.exports = convert;
|
||||
function convert(objFile, outputPath, options, done) {
|
||||
var binary = defaultValue(options.binary, false);
|
||||
var embed = defaultValue(options.embed, true);
|
||||
var quantize = defaultValue(options.quantize, false);
|
||||
|
||||
if (!defined(objFile)) {
|
||||
throw new Error('objFile is required');
|
||||
@ -38,6 +39,7 @@ function convert(objFile, outputPath, options, done) {
|
||||
var options = {
|
||||
binary : binary,
|
||||
embed : embed,
|
||||
quantize : quantize,
|
||||
createDirectory : false,
|
||||
basePath : inputPath
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user