Merge multiple mesh into a single one

For posterity and anyone needing this:

        let geoms=[]
        let meshes=[]
        clone.updateMatrixWorld(true,true)
        clone.traverse(e=>e.isMesh && meshes.push(e) && (geoms.push(( e.geometry.index ) ? e.geometry.toNonIndexed() : e.geometry().clone())))
        geoms.forEach((g,i)=>g.applyMatrix4(meshes[i].matrixWorld));
        let gg = BufferGeometryUtils.mergeBufferGeometries(geoms,true)
        gg.applyMatrix4(clone.matrix.clone().invert());
        gg.userData.materials = meshes.map(m=>m.material)

Here is a way to merge multiple meshes underneath a common root, into a single mesh+geometry with drawgroups.