Hey Guys,
i was watching a youtube tutorial for displaying a gltf model. when i executed the program instead of displaying the model the scene.bin file is getting downloaded.
I tried with a model which is available on the three.js.master ( damaged helmet) that file was working (till this stage) but this file is not working the file is a house downloaded from sketchfab.
The term “asset” does not refer to the loader but the glTF 3D model. So I was actually asking you to share scene.gltf and the respective bin file (and all related textures)^^.
I took the code https://threejs.org/examples/webgl_loader_gltf
and executed on my device the damaged helmet is working but if i try to execute the same piece of code with any other model which is present in the model directory in three.js-master or any model from the sketchfab the bin file is getting downloaded
i use visual code live server
When you say “the bin file is getting downloaded”, do you mean that you’re seeing the error you pasted above, Failed to load buffer "scene.bin"? The .gltf file requires the .bin file, and they both need to be hosted in the same directory on your web server. The error means that the application looked for the .bin file but could not find it. This might mean your webserver isn’t hosting it, or it’s in the wrong folder, or something has been renamed.
Your easiest workaround might be to pack the two files into one .glb using glTF-Pipeline or https://glb-packer.glitch.me/, then you only have one file to worry about. GLTFLoader can load .glb files too.
Can you please try it with the web server of the repository? Just type npm start in the root directory and then test the modified glTF example.
I remember that certain web servers have issues with mime type configuration so they apply wrong HTTP response header to certain files (which are then accidentally downloaded).