# Scene.bin is getting downloaded instead of displaying the model

**URL:** <https://discourse.threejs.org/t/scene-bin-is-getting-downloaded-instead-of-displaying-the-model/11858>\
**Category:** Questions\
**Tags:** gltf-loader\
**Created:** [January 5, 2020, 11:17am UTC](https://discourse.threejs.org/t/scene-bin-is-getting-downloaded-instead-of-displaying-the-model/11858 "2020-01-05T11:17:34Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![guru](https://avatars.discourse-cdn.com/v4/letter/g/ecae2f/32.png) [@guru](https://discourse.threejs.org/u/guru)\
**Post date:** [January 5, 2020, 11:17am UTC](https://discourse.threejs.org/t/scene-bin-is-getting-downloaded-instead-of-displaying-the-model/11858/1 "2020-01-05T11:17:34Z")

</div>

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.

this is the source code of it

 ![Annotation 2020-01-05 164053](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/7/7e28c444b1ffafe0d82863aac9f102819ea4dc53.jpeg)

and this is the error i get on the console  
 ![Annotation 2020-01-05 163554](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/7/7ffe65a9c5fad411e83f48298ce7cae13e188c4d.jpeg)

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.

thanks in advance

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [January 5, 2020, 12:53pm UTC](https://discourse.threejs.org/t/scene-bin-is-getting-downloaded-instead-of-displaying-the-model/11858/2 "2020-01-05T12:53:48Z")

</div>

Can you please share the `glTF` asset in this topic?

---

<div class="post-metadata">

**Author:** ![guru](https://avatars.discourse-cdn.com/v4/letter/g/ecae2f/32.png) [@guru](https://discourse.threejs.org/u/guru)\
**Post date:** [January 5, 2020, 1:15pm UTC](https://discourse.threejs.org/t/scene-bin-is-getting-downloaded-instead-of-displaying-the-model/11858/3 "2020-01-05T13:15:24Z")

</div>

It is the gltfloader which was available in the official download of three.ja-master from the threejs website  
[GLTFLoader.js](https://discourse.threejs.org/uploads/short-url/yYuB7OjEixqtJY6FEKqV5keWhje.js) (81.7 KB)

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [January 5, 2020, 1:52pm UTC](https://discourse.threejs.org/t/scene-bin-is-getting-downloaded-instead-of-displaying-the-model/11858/4 "2020-01-05T13:52:14Z")

</div>

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)^^.

---

<div class="post-metadata">

**Author:** ![guru](https://avatars.discourse-cdn.com/v4/letter/g/ecae2f/32.png) [@guru](https://discourse.threejs.org/u/guru)\
**Post date:** [January 5, 2020, 1:55pm UTC](https://discourse.threejs.org/t/scene-bin-is-getting-downloaded-instead-of-displaying-the-model/11858/5 "2020-01-05T13:55:34Z")

</div>

![unknown_baseColor](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/2/2b67acc781bbb8b27f2681c2d73a5220945295a3.jpeg) ![unknown_metallicRoughness](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/0/078613e68531f1e8888ae3d80fe87e8faa862cfd.jpeg) ![unknown_normal](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/9/90f8e0b7b5dfd2713b4c3cd6a38775b396718e2e.jpeg) [scene.bin](https://discourse.threejs.org/uploads/short-url/bSbEtM92xuV5srTNsdBeAvBhtZf.bin) (38.5 KB) [scene.gltf](https://discourse.threejs.org/uploads/short-url/4OFCEbTaz5paUlXUxL1KdfKgHLV.gltf) (5.2 KB)

sorry for the mistake here are the assets you asked for

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [January 5, 2020, 2:21pm UTC](https://discourse.threejs.org/t/scene-bin-is-getting-downloaded-instead-of-displaying-the-model/11858/6 "2020-01-05T14:21:42Z")

</div>

I’ve added the asset into the official repository and used it in this example:

[https://threejs.org/examples/webgl\_loader\_gltf](https://threejs.org/examples/webgl_loader_gltf)

This is the result:

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/b/b1eb8b7db1c094885d235bec63ad9689991b0c3c.jpeg)

When the `bin` file is not loaded correctly on your computer, there might be some issues with your web server.

---

<div class="post-metadata">

**Author:** ![guru](https://avatars.discourse-cdn.com/v4/letter/g/ecae2f/32.png) [@guru](https://discourse.threejs.org/u/guru)\
**Post date:** [January 5, 2020, 2:39pm UTC](https://discourse.threejs.org/t/scene-bin-is-getting-downloaded-instead-of-displaying-the-model/11858/7 "2020-01-05T14:39:57Z")

</div>

Thanks for looking into it and whats the step to make it work properly to the code on the above

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [January 5, 2020, 7:51pm UTC](https://discourse.threejs.org/t/scene-bin-is-getting-downloaded-instead-of-displaying-the-model/11858/8 "2020-01-05T19:51:26Z")

</div>

I’ve just loaded the house model instead of the damaged helmet in `webgl_loader_gltf`. And also reduced the scale of the scene like so:

```auto
gltf.scene.scale.multiplyScalar( 0.001 );

```

---

<div class="post-metadata">

**Author:** ![guru](https://avatars.discourse-cdn.com/v4/letter/g/ecae2f/32.png) [@guru](https://discourse.threejs.org/u/guru)\
**Post date:** [January 6, 2020, 4:02am UTC](https://discourse.threejs.org/t/scene-bin-is-getting-downloaded-instead-of-displaying-the-model/11858/9 "2020-01-06T04:02:51Z")

</div>

I took the code  
[https://threejs.org/examples/webgl\_loader\_gltf](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

---

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [January 6, 2020, 4:33am UTC](https://discourse.threejs.org/t/scene-bin-is-getting-downloaded-instead-of-displaying-the-model/11858/10 "2020-01-06T04:33:21Z")

</div>

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/](https://glb-packer.glitch.me/), then you only have one file to worry about. GLTFLoader can load `.glb` files too.

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [January 6, 2020, 5:47pm UTC](https://discourse.threejs.org/t/scene-bin-is-getting-downloaded-instead-of-displaying-the-model/11858/11 "2020-01-06T17:47:36Z")

</div>

> [@guru](#):
>
> i use visual code live server

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).
