Blendshapes are one of those things where sparse accessors are incredibly useful, so this is a first pass at getting them working with FBX2glTF - it seems to work, glTF-validator seems completely happy with the file, but it appears that most software out there doesn't want to load them.
Blender doesn't like having an accessor with no bufferview (adding the base position bufferview to the accessor works, but does very strange things in Blender on account of not being a giant list of zeroes).
Although position, normal and tangents could all have their own sparse indices, it made more sense to use a shared index list based on the assumption that there would be significant overlap between each index list.
I'm not super happy with the giant initializer list in the overloaded Accessor constructor, so I wouldn't mind going back and changing that and I'm not 100% convinced that normals & tangents are stored as zero length normals for non deforming vertices.
Extending these to skin weights hopefully shouldn't be a big deal, I've tried to make the new methods as flexible as possible.
Blendshapes are one of those things where sparse accessors are incredibly useful, so this is a first pass at getting them working with FBX2glTF - it seems to work, glTF-validator seems completely happy with the file, but it appears that most software out there doesn't want to load them.
Blender doesn't like having an accessor with no bufferview (adding the base position bufferview to the accessor works, but does very strange things in Blender on account of not being a giant list of zeroes).
Although position, normal and tangents could all have their own sparse indices, it made more sense to use a shared index list based on the assumption that there would be significant overlap between each index list.
I'm not super happy with the giant initializer list in the overloaded Accessor constructor, so I wouldn't mind going back and changing that and I'm not 100% convinced that normals & tangents are stored as zero length normals for non deforming vertices.
Extending these to skin weights hopefully shouldn't be a big deal, I've tried to make the new methods as flexible as possible.