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
2 Answers
Reset to default 4This 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.
本文标签:
版权声明:本文标题:javascript - Error when loading gltf file with GLTFLoader: RangeError: Invalid typed array length: 4 - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742055910a2418292.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论