function removeUnusedElements(gltf, elementTypes) {
  elementTypes = elementTypes ?? allElementTypes;
  allElementTypes.forEach(function (type) {
    if (elementTypes.indexOf(type) > -1) {
      removeUnusedElementsByType(gltf, type);
    }
  });
  return gltf;
}
Removes unused elements from gltf.

@param {object} gltf A javascript object containing a glTF asset.
@param {string[]} [elementTypes=['mesh', 'node', 'material', 'accessor', 'bufferView', 'buffer']] Element types to be removed. Needs to be a subset of ['mesh', 'node', 'material', 'accessor', 'bufferView', 'buffer'], other items will be ignored.

@private