Sorry for the delay. I’m back now and will investigate.
My immediate observation is that this is not a regression from my PR since it repros with 6.49.0
and 5.71.1
.
Just for reference, the data in the GLB is bad since the glTF chunk has a length that is not aligned to 4-bytes. If you put the asset in the glTF-Validator, it reports:
{
"code": "GLB_CHUNK_LENGTH_UNALIGNED",
"message": "Length of 0x4e4f534a chunk is not aligned to 4-byte boundaries.",
"severity": 0,
"offset": 12
}
This will result in undefined behavior. It looks like this is generated by Blender. Maybe use a newer version to see if the problem has already been fixed. Otherwise, please file an issue with Blender as this is an invalid GLB file.
For Babylon.js, this used to throw an exception, but we allowed it at some point with this commit from @Deltakosh. This code got moved around a bit. This code makes it such that the code doesn’t throw exceptions anymore, but it also will end up with bad misaligned data. The proposed PR fixes the problem, but it copies the buffer (as it has to in order to have correct data) which is a slow operation. It also now needs to be in multiple places as I’ve copied this part of the code in another function. I’ll note this in the PR and we can continue from there.