Source/ThirdParty/GltfPipeline/removeUnusedElements.js
/**
     * 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
     */
Removes unused elements from gltf.
@param {Object} gltf A javascript object containing a glTF asset.

@private
Removes unused elements from gltf . @param { Object } gltf A javascript object containing a glTF asset . @private
function removeUnusedElements(gltf, elementTypes) {
        elementTypes = defaultValue(elementTypes, allElementTypes);
        allElementTypes.forEach(function(type) {
            if (elementTypes.indexOf(type) > -1) {
                removeUnusedElementsByType(gltf, type);
            }
        });
        return gltf;
    }
function removeUnusedElements ( gltf , elementTypes ) { elementTypes = defaultValue ( elementTypes , allElementTypes ) ; allElementTypes . forEach ( function ( type ) { if ( elementTypes . indexOf ( type ) > - 1 ) { removeUnusedElementsByType ( gltf , type ) ; } } ) ; return gltf ; }
Removes unused elements from gltf.
Removes unused elements from gltf .