pmndrs / gltfjsx

🎮 Turns GLTFs into JSX components
https://gltf.pmnd.rs
MIT License
4.5k stars 293 forks source link

Invalid typed array length: 1980 #75

Closed hjopel closed 3 years ago

hjopel commented 3 years ago

Hi all. Thanks for this library.

Previously, I've been using quite some Three.js and now want to combine it with react. Everything works fine. When I want to convert for example the Buggy.gltf from https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/Buggy/glTF, it works perfectly and I get the .js file. Once I placed this file in my src/components/Models and use it in my program, I get this error:

Uncaught Invalid typed array length: 1980 index.js:1 The above error occurred in the component:

at Model (http://localhost:3000/static/js/main.chunk.js:422:69)
at Suspense
at Provider (http://localhost:3000/static/js/vendors~main.chunk.js:11709:3)

Consider adding an error boundary to your tree to customize error handling behavior. Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries. console. @ index.js:1 react-reconciler.development.js:2559 Uncaught Invalid typed array length: 1980 index.js:1 The above error occurred in the component:

at Canvas (http://localhost:3000/static/js/vendors~main.chunk.js:11481:3)
at Loading (http://localhost:3000/static/js/main.chunk.js:291:1)
at header
at div
at App

Consider adding an error boundary to your tree to customize error handling behavior. Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries. console. @ index.js:1 react-dom.development.js:11340 Uncaught Invalid typed array length: 1980

In the following I will include the code and the layout of my app: image

image

image

image

hjopel commented 3 years ago

my bad, forgot to add the .bin file to public