# Looking to merge to examples

**URL:** <https://discourse.threejs.org/t/looking-to-merge-to-examples/16691>\
**Category:** Questions\
**Tags:** instanced-mesh\
**Created:** [June 30, 2020, 11:25am UTC](https://discourse.threejs.org/t/looking-to-merge-to-examples/16691 "2020-06-30T11:25:30Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [June 30, 2020, 12:30pm UTC](https://discourse.threejs.org/t/looking-to-merge-to-examples/16691/2 "2020-06-30T12:30:35Z")

</div>

I’m afraid the way you create an instance of `InstancedMesh` is not correct. You can’t just pass the result object of `GLTFLoader.load()` to its constructor. I’m referring to the following line:

```auto
var mesh = new THREE.InstancedMesh( gltf, material );

```

You should try instead to traverse through `gltf.scene`, detect all meshes and replace them with `InstancedMesh`. The traverse can be done by using `Object3D.traverse()`.

I also suggest you have a look at the [documentation](https://threejs.org/docs/index.html#examples/en/loaders/GLTFLoader) of `GLTFLoader` in order to understand the `gltf` result object.

---

_[View the full topic](https://discourse.threejs.org/t/looking-to-merge-to-examples/16691)._
