KhronosGroup / glTF-CSharp-Loader

C# Reference Loader for glTF
Other
213 stars 60 forks source link

Updated JSON schema to handle 2020-12 #37

Closed emackey closed 2 years ago

emackey commented 2 years ago

The latest glTF JSON schema has been updated from draft-7 to draft 2020-12.

The main changes are that enums switched to using the const keyword, and a new means of specifying exclusiveMinimum was introduced. Also, a few extra properties such as $id have appeared, but those are ignored here.

This PR adds the ability to read either the new or old schemas, whichever are found, as they are quite similar.

This builds on #34.

Fixes #21. Fixes #35.

Written for https://github.com/KhronosGroup/glTF/pull/2034#issuecomment-926871454.

bghgary commented 2 years ago

I made a fix to make the unit test succeed.