I added a "unwrap" function to the glTF-transform library/CLI tool written by @donmccurdy, which he merged today! It uses the xatlas library to generate new texture coordinates for a mesh that can be used for things like lightmapping, AO, and texture painting.

https://github.com/donmccurdy/glTF-Transform/pull/1660

To make it work, I've written a new JavaScript wrapper for xatlas called "watlas". It's available now on npm! https://github.com/toji/watlas
GitHub - toji/watlas: A web port of XAtlas: Mesh parameterization / UV unwrapping library

A web port of XAtlas: Mesh parameterization / UV unwrapping library - toji/watlas

GitHub