qmuntal / gltf

Go library for encoding glTF 2.0 files
https://www.khronos.org/gltf/
BSD 2-Clause "Simplified" License
241 stars 32 forks source link

AnimationSampler has optional Input and Output fields #58

Closed mokiat closed 1 year ago

mokiat commented 2 years ago

Hi,

This is a minor issue.

While using the library to parse some animations, I noticed that the Input and Output fields of the AnimationSampler object are defined as pointers to uint32, which is the usual approach when defining optional fields.

However, looking at the spec, it seems that these are required: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#reference-animation-sampler

Unless I am missing something, maybe you can consider making them non-pointer in some future iteration. Though to be honest, it's not really that big of an issue as is.

qmuntal commented 2 years ago

Thanks for reporting this issue. The API is still not closed, and it won't be until there is a v1 release, so I would rather fix the inconsistency now.