Source/ThirdParty/GltfPipeline/removeUnusedElements.js
// mesh, camera, extensions and has no children
mesh, camera, extensions and has no children
mesh camera extensions and has no children
function nodeIsEmpty(gltf, node) {
        if (defined(node.mesh) || defined(node.camera) || defined(node.skin)
            || defined(node.weights) || defined(node.extras)
            || (defined(node.extensions) && node.extensions.length !== 0)) {
            return false;
        }
        return !defined(node.children)
            || node.children.filter(function(n) {
                return !nodeIsEmpty(gltf, gltf.nodes[n]);
            }).length === 0;
    }
function nodeIsEmpty ( gltf , node ) { if ( defined ( node . mesh ) || defined ( node . camera ) || defined ( node . skin ) || defined ( node . weights ) || defined ( node . extras ) || ( defined ( node . extensions ) && node . extensions . length !== 0 ) ) { return false ; } return ! defined ( node . children ) || node . children . filter ( function ( n ) { return ! nodeIsEmpty ( gltf , gltf . nodes [ n ] ) ; } ) . length === 0 ; }
mesh, camera, extensions and has no children
mesh camera extensions and has no children
// Empty if no children or children are all empty nodes