Closed javagl closed 1 year ago
Attached here is a ZIP that contains some stuff that may be useful for testing:
CESIUM_primitive_outline
extensiontileset*.json
for each of themcesiumPrimitiveOutline-2023-04-15.zip
EDIT: If all this looks OK, I'd add a basic test, analogous to https://github.com/javagl/gltf-pipeline/blob/3a5a71d5d2803831a477d35fa87b91f0fc6a8807/specs/lib/removeUnusedElementsSpec.js#L910
A random note: The README at https://github.com/CesiumGS/gltf-pipeline/blob/dc213115d2ca12bd5afae00770e48c019ac7d2d5/README.md#command-line-flags says
--draco.quantizePositionBits
... No, default 14
but the actual default seems to be 11, as of https://github.com/CesiumGS/gltf-pipeline/blob/dc213115d2ca12bd5afae00770e48c019ac7d2d5/lib/compressDracoMeshes.js#L493
(I can fix that in this PR, if desired)
Added as basic spec that checks whether the accessor
that is used for the indices in CESIUM_primitive_outline
is not removed.
It also checks whether the accessor index is updated, as in https://github.com/CesiumGS/gltf-pipeline/pull/631/commits/d38c47d1c8b529092d63bca09f0629d07f05b90f#diff-5650181c5f5a0ddc9ad5e9b8212725e67ab7fd62e5a1644a8d01e22629edcc2dR1009 . This does not seem to be done in (all) other specs. And one could argue about this: On the one hand, test like this are "overconstrained". The pipeline could do whatever it wanted with these accessors - even reorder them completely. But on the other hand, the check does (similar to all existing ones) already check the resulting list of accessors solely based on their name, so that's probably OK...
Updated the README.md with the values for the draco defaults that are actually set in compressDracoMeshes.defaults
.
It also adds the uncompressedFallback
option there, which was not mentioned in the README yet (I assume that this was an oversight. If it should not be mentioned, I'll remove it)
Thank @javagl. The doc updates look good too.
The
removeUnusedElements
family of functions considered the accessors that are used byCESIUM_primitive_outline
to be "unused", and removed them.This PR is a small fix that causes these accessors to be preserved, and the
CESIUM_primitive_outline.indices
to be updated (no, not the accessor contents, only that accessor index).This is implemented in a somewhat copy-and-paste-ish style: It uses the same approach that was used for other extensions. But one could consider to generalize the approach there: Having to support each extension manually like this does not scale indefinitely....
This might fix https://github.com/CesiumGS/gltf-pipeline/issues/630