add VRM support
Simple change that allows one to drag and drop + export a VRM avatar file. I've tested in a number of sample avatars and it works. Afaik this is the cleanest way to process VRM files with KTX compression.
I didn't add any UI changes that explicitly mention how VRM is supported, just don't think its necessary in preventing people from doing such. VRM are technically gltf files but might not be recognized as an official standard yet. For more info: https://vrm.dev/en/vrm/vrm_about/
Here I rename a VRM sample back to glb and test in gltf-viewer, confirmed extension is there:
Tested the VRM output with KTX in a number of programs like hyperfy, oncyber, monaverse, upstreet, and all confirmed working.
I also modified the github action such that it will build a demo site in a separate gh-pages branch which can be deployed from the same repo as the codebase instead of being separated like it is now (https://github.com/KhronosGroup/glTF-Compressor-Release). Can see it working in my fork.
Demo: https://madjin.github.io/glTF-Compressor/
This version imports and exports a VRM, but the UI doesn't reflect that. I wasn't sure about how Khronos might treat unofficial standards. If you compress VRM textures and click export glTF, it will retain the VRM extension when saving. I just didn't want to deprive creators from a simple drag and drop solution for KTX compression. VRM is becoming a very popular format and there hasn't been an easy solution up until now. This is the best GUI application to do it according to KTX Artist Guide.
Great idea
Something broke in which the VRM files become corrupted when I export, trying to backtrace these last two commits:
- https://github.com/KhronosGroup/glTF-Compressor/commit/467484fb42f2008b1b553610a39cc2eb8285b646
- https://github.com/KhronosGroup/glTF-Compressor/commit/af160e0505ca94375204a6c38dd944e75cf66d2d
VRM 1.0 file has less errors than VRM 0.x file it seems
It's not detecting filename extension and changing the Flavour anymore either
I have a working version online from when things were working in December: https://m3org.com/optimize/ Here's where I'ma test some changes with current version of glTF-Compressor: https://github.com/madjin/glTF-Compressor/tree/vrm-fix