donmccurdy / glTF-Transform

glTF 2.0 SDK for JavaScript and TypeScript, on Web and Node.js.
https://gltf-transform.dev
MIT License
1.3k stars 145 forks source link

fix(functions): Remove side effects of no-op meshopt() and quantize() calls #1438

Closed donmccurdy closed 1 week ago

donmccurdy commented 1 week ago

In some cases meshopt() or quantize() may be called, but their extensions are not necessary. This may occur either because the model has no accessors, or because no primitives qualified for quantization. After this PR, extensions are not added to the document in these cases — it doesn't make sense to list KHR_mesh_quantization if there are no meshes, for example.

donmccurdy commented 1 week ago

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @donmccurdy and the rest of your teammates on Graphite Graphite