vpenades / SharpGLTF

glTF reader and writer for .NET Standard
MIT License
467 stars 75 forks source link

TrackBuilder does not support single point when using linear curve #80

Closed ptasev closed 3 years ago

ptasev commented 3 years ago

I'm adding this issue to track what we discussed in Discord. I believe that linear curves according to the specification support having only 1 keyframe/point even though it doesn't make much sense.

Support for this should be added and, for the curve types that do not support only 1 point, add a guard higher up in the code so that it doesn't fail in the buffer view part of the code making the error obscure.

vpenades commented 3 years ago

The minimum number of keys was discussed here.

Still looking into it...

vpenades commented 3 years ago

Ok, I've confirmed this is a bug in one of the underlying functions of curve evaluation.. I'll fix it and also I'll take the time to add some documentation and argument valuation

ptasev commented 3 years ago

Excellent, thank you!