gltf-rs / gltf

A crate for loading glTF 2.0
Apache License 2.0
534 stars 124 forks source link

`impl Default for gltf_json::Node`. #403

Closed kpreid closed 11 months ago

kpreid commented 11 months ago

Since Nodes are generally expected to have only a few non-absent fields, providing this Default implementation will allow code that is generating Nodes to be much more concise.

alteous commented 11 months ago

The original reason why Node didn't have a Default implementation was because an empty node is invalid. I think there are better ways of avoiding this though so LGTM. :+1: