Fix issue with keyframe order in bedrock exports

This commit is contained in:
JannisX11 2020-10-28 22:09:16 +01:00
parent 2bfafac90d
commit aab79b3d32

View File

@ -171,11 +171,11 @@ class Animation {
bone_tag[channel] = channels[channel][timecodes[0]][0];
}
} else {
timecodes.sort().forEach((time) => {
timecodes.sort((a, b) => parseFloat(a) - parseFloat(b)).forEach((timecode) => {
if (!bone_tag[channel]) {
bone_tag[channel] = {}
}
bone_tag[channel][time] = channels[channel][time]
bone_tag[channel][timecode] = channels[channel][timecode];
})
}
}