Closed servinlp closed 1 year ago
you don't need --transform, it is just a small helper calling gltf-transform for you. you can use any other tool for compression.
btw, as for texture compression: https://twitter.com/0xca0a/status/1547258568956678144
until now has the smallest results i have seen so far. i wanted to add squoosh to gltfjsx but it looks like the library isn't maintained, so it feel out and now it is incompatible with node. i hope it's going to catch up again.
What I want
When using the
--transform
option I wan't to be able to transform to GLTF instead of GLB.Why I want it
In our current workflow we prefer the use of GLTF + BIN + textures over GLB's when relevant. This because a lot of times the large file size is partially or primarily do to texture files. To optimize this we like to use services like Cloudflare Polish. This will, depending on your browser support, automatically send a WebP version of the texture reducing the total size.
In the future Polish will also be supporting AVIF.
Quote here
How to achieve this
When playing around with the repo I noticed that if you change the output file name from glb to gltf (here) it already works. (When testing with a file that was already GLTF + BIN + textures.)
My idea was to maybe add an option to the
--transform
where you specify glb or gltf. Or add the option to give a custom name to the file and thus tell it to be a glb or gltf.Love to hear others opinion on this.