-1

I'm currently trying to load a model gltfLoader I've debugged what I can with some of the common errors. I've made sure my gltf file is in the /public folder, I've also tried using and import with the path both give the same error:

"Uncaught Could not load /scene.gltf: Invalid typed array length: 55419 "

currently my flies look like this :

I've tired to load the .gltf with different methods such as the useGLTF but i get the same issue. The network call has the scene obj correctly though here:

the main file call in the ThreeD.jsx is wraped in a <suspense/> tag and then the <Model/> call i've also tried to import the model using const Model = lazy(() => import("./Model")); but that seemed to get me no where on the main issue of the scene not loading. i grabed my flies from : https://sketchfab.com/3d-models?date=week&sort_by=-likeCount&cursor=bz0yJnA9NDA%3D

any help or ideas on what to debug would be amazing, im happy to provied any details needed.

Rabbid76
  • 202,892
  • 27
  • 131
  • 174
sam
  • 27
  • 4
  • 1
    Please read [Discourage screenshots of code and/or errors](https://meta.stackoverflow.com/questions/303812/discourage-screenshots-of-code-and-or-errors). Paste the code and error trace! – Rabbid76 Jun 23 '22 at 05:03
  • will do that, sorry for the mistake will do better on my next question. – sam Jun 24 '22 at 22:23
  • I recommend editing this question and answer. – Rabbid76 Jun 25 '22 at 12:03

1 Answers1

-1

The Issue was i needed to have the entire 3d file in /public and i needed to lazy import the model file.

Rabbid76
  • 202,892
  • 27
  • 131
  • 174
sam
  • 27
  • 4
  • 3
    As others wrote, please do not paste screenshots of your code. They're often unhelpful (e. g. can't be copy-pasted) and confusing (showing non-relevant parts like the IDE). Please paste your code as text instead and use the formatting possibilities provided. – ahuemmer Jun 23 '22 at 09:39