gltf-pipeline
Version:
Content pipeline tools for optimizing glTF assets.
18 lines (15 loc) • 496 B
JavaScript
const parseGlb = require('./parseGlb');
const processGltf = require('./processGltf');
module.exports = glbToGltf;
/**
* Convert a glb to glTF.
*
* @param {Buffer} glb A buffer containing the glb contents.
* @param {Object} [options] The same options object as {@link processGltf}
* @returns {Promise} A promise that resolves to an object containing a glTF asset.
*/
function glbToGltf(glb, options) {
const gltf = parseGlb(glb);
return processGltf(gltf, options);
}
;