Support transforms reporting a 'skip' result
Opened this issue · 0 comments
donmccurdy commented
In many cases transforms complete without doing anything. Examples include resample()
on a model with no animation, or textureCompress()
on a model with no textures.
If a model quits early with nothing to do, it'd be nice if there were some API for it to report that result. This could be shown in the CLI output, for example,
Before:
> gltf-transform optimize in.glb out.glb
✔ dedup 731ms
✔ instance 1ms
✔ palette 27ms
✔ flatten 1ms
✔ join 1,115ms
✔ weld 23ms
✔ simplify 26ms
✔ resample 0ms
✔ prune 0ms
✔ sparse 9ms
✔ textureCompress 0ms
✔ meshopt 40ms
After:
> gltf-transform optimize in.glb out.glb
✔ dedup 731ms
✔ instance –
✔ palette 27ms
✔ flatten 1ms
✔ join 1,115ms
✔ weld 23ms
✔ simplify 26ms
✔ resample –
✔ prune 0ms
✔ sparse 9ms
✔ textureCompress –
✔ meshopt 40ms
In some cases it might take a transform a non-trivial amount of time to determine that it can't do anything ... TBD how that should be handled, and whether the CLI should display the time or a -
.