Merge pull request #233 from 8i/fix-animation-sampler-serialization

Reserve space for animation samplers in serialization
This commit is contained in:
Syoyo Fujita 2020-01-08 00:47:41 +09:00 committed by GitHub
commit ddc14f8ba6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6465,6 +6465,7 @@ static void SerializeGltfAnimation(Animation &animation, json &o) {
{ {
json samplers; json samplers;
JsonReserveArray(samplers, animation.samplers.size());
for (unsigned int i = 0; i < animation.samplers.size(); ++i) { for (unsigned int i = 0; i < animation.samplers.size(); ++i) {
json sampler; json sampler;
AnimationSampler gltfSampler = animation.samplers[i]; AnimationSampler gltfSampler = animation.samplers[i];