How to use the gltf-pipeline.glbToGltf 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 / specs / lib / upgradeTilesetSpec.js View on Github external
'use strict';
var fsExtra = require('fs-extra');
var GltfPipeline = require('gltf-pipeline');
var path = require('path');
var extractB3dm = require('../../lib/extractB3dm');
var getWorkingDirectory = require('../../lib/getWorkingDirectory');
var readFile = require('../../lib/readFile');
var upgradeTileset = require('../../lib/upgradeTileset');

var glbToGltf = GltfPipeline.glbToGltf;

var batchedDeprecated1Directory = './specs/data/BatchedDeprecated1/';
var batchedDeprecated2Directory = './specs/data/BatchedDeprecated2/';
var upgradedDirectory;
var upgradedJson;
var upgradedB3dm1;
var upgradedB3dm2;

describe('upgradeTileset', function() {
    beforeEach(function() {
        upgradedDirectory = getWorkingDirectory();
        upgradedJson = path.join(upgradedDirectory, 'tileset.json');
        upgradedB3dm1 = path.join(upgradedDirectory, 'batchedDeprectated1.b3dm');
        upgradedB3dm2 = path.join(upgradedDirectory, 'batchedDeprectated2.b3dm');
    });
    afterEach(function() {