spnda / fastgltf

A modern C++17 glTF 2.0 library focused on speed, correctness, and usability
https://fastgltf.readthedocs.io/v0.8.x/
MIT License
315 stars 48 forks source link

Support the `extras` field #41

Open DethRaid opened 10 months ago

DethRaid commented 10 months ago

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

spnda commented 9 months ago

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

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'.