# How to add multiple gltf to scene using for loop

**URL:** <https://discourse.threejs.org/t/how-to-add-multiple-gltf-to-scene-using-for-loop/52235>\
**Category:** Questions\
**Tags:** react-three, react, gltf-loader, google-map\
**Created:** [May 31, 2023, 4:25am UTC](https://discourse.threejs.org/t/how-to-add-multiple-gltf-to-scene-using-for-loop/52235 "2023-05-31T04:25:48Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Sue](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@Sue](https://discourse.threejs.org/u/Sue)\
**Post date:** [May 31, 2023, 5:30am UTC](https://discourse.threejs.org/t/how-to-add-multiple-gltf-to-scene-using-for-loop/52235/4 "2023-05-31T05:30:57Z")

</div>

I wrote like the following and it worked! Thank you so much.

```javascript
import { clone } from "three/examples/jsm/utils/SkeletonUtils.js";

const locations = [
  { lat: 49.285804, lng: -123.119927 },
  { lat: 49.286704, lng: -123.129184 },
]

loader.load("/low_australian_shepherd/scene.gltf", function (gltf) {
  for (let i = 0; i <= locations.length; i++) {
    const cloneGLTF = clone(gltf.scene);
    scene.add(cloneGLTF);
  }
});

```

> [@How to clone a model that's loaded with GLTFLoader()?](https://discourse.threejs.org/t/how-to-clone-a-model-thats-loaded-with-gltfloader/23723/9):
>
> @Rene_Veerman I had the same issue where const model = gltf.scene.clone(); didn’t show the cloned model even though there were no errors. @WilliamBagel 's suggestion worked for me (SkeletonUtils.clone()), and here’s an example of the code I used: import { clone } from 'three/examples/jsm/utils/SkeletonUtils.js'; let tree = {}; const gltfLoader = new GLTFLoader(); gltfLoader.load( '/models/tree/scene.gltf', (gltf) =\> { tree = gltf.scene; tree.position.x = 20; scene.add(tree); …

---

_[View the full topic](https://discourse.threejs.org/t/how-to-add-multiple-gltf-to-scene-using-for-loop/52235)._
