admin管理员组

文章数量:1318981

I am able to load close to 100 GLTF files without issue with my code. But one file in particular causes this error:

"RangeError: Invalid typed array length: 4"

Would you know where it es from and how to fix it ?

I am able to load close to 100 GLTF files without issue with my code. But one file in particular causes this error:

"RangeError: Invalid typed array length: 4"

Would you know where it es from and how to fix it ?

Share Improve this question asked Oct 8, 2018 at 16:37 TheProgrammerTheProgrammer 1,5094 gold badges30 silver badges54 bronze badges 3
  • When loading this model on github.khronos/glTF-Validator what do you see? Does the model load in sandbox.babylonjs.? – Don McCurdy Commented Oct 8, 2018 at 17:04
  • 1 @DonMcCurdy I just realized: the GLTF file is empty. I used FBXtoGLTF converter and it worked fine on more than 100 files. It seems it has failed on this one. I could not have imagined it would fail in such a big manner. Thank you for replying ! – TheProgrammer Commented Oct 8, 2018 at 17:13
  • Great! Filled that into an answer below for future readers. – Don McCurdy Commented Oct 8, 2018 at 21:47
Add a ment  | 

2 Answers 2

Reset to default 4

This error most likely means the file is invalid; you can test that by opening the file on http://github.khronos/glTF-Validator/. If so, I would remend reporting a bug on the tool used to create the file.

Babylonjs sandbox is also quite useful.

https://sandbox.babylonjs./

Here you can upload your models to see if there are errors or stuff. For example, the link above from Khronos won't tell you when the URLs on your file are not correctly formatted, as is the case when you rename the .bin file.

本文标签: