KhronosGroup / KhronosGroup/glTF
Inconsistent object field naming in Material for generic properties
- Dominant language
- HTML
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 17h 26m
- Merged PRs (30d)
- 5
Description
The `name`, `extras`, and `extensions` fields exist on every object, in that order, and always at the end as the last fields. However, for the `Material` object these fields come first, as declared here in the JSON schema: https://github.com/KhronosGroup/glTF/blob/082d5a98f479c37dff18767982d1431fc6c014fd/specification/2.0/schema/material.schema.json#L9-L11
Is there any reason for this inconsistency? I'm interested since I want to speed up the JSON deserialization in [`fastgltf`](https://github.com/spnda/fastgltf) by assuming a certain field order, that is consistent with the spec, when I can safely detect the asset was serialized using the library. And it feels wrong to me that these three fields appear at the beginning here instead of the end.
Contributor guide
Assessment
This issue has not been assessed yet.