How to load a 3D Model?

Hello reader,
I am new to this three.js and I am using it in my final year project, I’ve learnt about scene, camera, renderer etc. I have loaded an geometryBox, but I am failing to load 3D Object of GLTF format, I have seen this video, and have done exact same thing but this isn’t working, please help.
your help will be highly appreciated.
warm regards.

Please share your current work of progress as a GitHub repository.

You can compare with the very simple example from the
Collection of examples from .

see LoadGLTF

1 Like

Hey, these are errors I am facing.

Everything works fine if I move the textures in a textures directory:

That’s because the glTF assets refers to textures like so: textures/World_ap.16_baseColor.jpeg. In your project folder however, the textures are in the same directory like all other files which is obviously wrong.

I have made the textures directory but still getting this following error:

Error: THREE.GLTFLoader: Failed to load buffer “scene.bin”.
at Object.onError (GLTFLoader.js:1724)
at XMLHttpRequest. (three.module.js:35840)

Are you hosting your app from a local web server?

I am using servez as it is recommended in three.js docs.

Sorry, but I can’t reproduce this error with your sources on my local computer :frowning_face:

You might want to use the browser console to ensure no 404 errors.

Thank you so much guys for your help! I figured out the error, I converted gltf file into glb and it loaded!

Thank you Mugen.