fastgltf icon indicating copy to clipboard operation
fastgltf copied to clipboard

Support the `extras` field

Open DethRaid opened this issue 2 years ago • 1 comments

I'd like to request support for the extras field in fastgltf. I don't need anything fancy, a simple string will suffice

I know there's been some discussion about this on Discord, but this feature is crucial to what I'm trying to do so I'm making an Issue about it

DethRaid avatar Jan 03 '24 20:01 DethRaid

A first revision of this functionality has been implemented with https://github.com/spnda/fastgltf/commit/01b59909c79ff9c8b4e1fae6e5009ec0a7a4a894. This, however, does not support some cases:

  • Primitive extras
  • Sparse accessor extras

Also, I'm afraid that perhaps letting the user access the simdjson objects directly might cause some issues. There perhaps also should be some sort of possibility of reporting errors on the callback function, especially when encountering JSON parsing issues. I'll still leave this issue open because of the two unsupported edge cases, possible improvements to the API, and its relation to #5, but still mark this as 'done'.

spnda avatar Feb 21 '24 20:02 spnda