How to use the gltf-pipeline.parseArguments function in gltf-pipeline

To help you get started, weā€™ve selected a few gltf-pipeline examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github AnalyticalGraphicsInc / 3d-tiles-tools / tools / bin / 3d-tiles-tools.js View on Github external
function readAndOptimizeB3dm(inputPath, outputPath, force, optionArgs) {
    var options = GltfPipeline.parseArguments(optionArgs);
    outputPath = defaultValue(outputPath, inputPath.slice(0, inputPath.length - 5) + '-optimized.b3dm');
    var gzipped;
    var b3dm;
    return checkFileOverwritable(outputPath, force)
        .then(function() {
            return fsExtra.readFile(inputPath);
        })
        .then(function(fileBuffer) {
            gzipped = isGzipped(fileBuffer);
            if (isGzipped(fileBuffer)) {
                return zlibGunzip(fileBuffer);
            }
            return fileBuffer;
        })
        .then(function(fileBuffer) {
            b3dm = extractB3dm(fileBuffer);
github AnalyticalGraphicsInc / 3d-tiles-tools / tools / bin / 3d-tiles-tools.js View on Github external
function readAndOptimizeI3dm(inputPath, outputPath, force, optionArgs) {
    var options = GltfPipeline.parseArguments(optionArgs);
    outputPath = defaultValue(outputPath, inputPath.slice(0, inputPath.length - 5) + '-optimized.i3dm');
    var gzipped;
    var i3dm;
    return checkFileOverwritable(outputPath, force)
        .then(function() {
            return fsExtra.readFile(inputPath);
        })
        .then(function(fileBuffer) {
            gzipped = isGzipped(fileBuffer);
            if (isGzipped(fileBuffer)) {
                return zlibGunzip(fileBuffer);
            }
            return fileBuffer;
        })
        .then(function(fileBuffer) {
            i3dm = extractI3dm(fileBuffer);