# 【Question】About Loaded resource

**URL:** <https://discourse.threejs.org/t/question-about-loaded-resource/30971>\
**Category:** Questions\
**Tags:** gltf-loader\
**Created:** [October 19, 2021, 2:28pm UTC](https://discourse.threejs.org/t/question-about-loaded-resource/30971 "2021-10-19T14:28:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![JohnConstantine](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@JohnConstantine](https://discourse.threejs.org/u/JohnConstantine)\
**Post date:** [October 19, 2021, 2:28pm UTC](https://discourse.threejs.org/t/question-about-loaded-resource/30971/1 "2021-10-19T14:28:42Z")

</div>

I wanna load a model once,but display 2 of em.  
This is my code

```javascript
new GLTFLoader().load(url,gltf=>{
    const m1 = gltf.scene
    const m2 = m1.clone()
    scene.add(m1)
    scene.add(m2)
})

```

what’s wrong with this code?

---

<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:** [October 19, 2021, 2:46pm UTC](https://discourse.threejs.org/t/question-about-loaded-resource/30971/2 "2021-10-19T14:46:08Z")

</div>

At first glance the code looks fine. What exactly does not work?

---

<div class="post-metadata">

**Author:** ![JohnConstantine](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@JohnConstantine](https://discourse.threejs.org/u/JohnConstantine)\
**Post date:** [October 20, 2021, 1:50am UTC](https://discourse.threejs.org/t/question-about-loaded-resource/30971/3 "2021-10-20T01:50:45Z")

</div>

![图片](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/c/d/cdbbbdaf4be8fbb053255f0587e792d2818c94d0.jpeg)  
This is normally the model added to the scene  
code here

```javascript
new GLTFLoader().load(url,gltf=>{
    const m1 = gltf.scene
    m1.scale.set(0.01,0.01,0.01)
    scene.add(gltf.scene)
})

```

but something’s wrong when i clone it and add to the scene  
like this pics

 ![图片](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/d/0/d099a42238c68bd3162d90bc6cda3538cbe14a71.jpeg)  
code here

```javascript
new GLTFLoader().load(url,gltf=>{
    const m1 = gltf.scene.clone()
    m1.scale.set(0.01,0.01,0.01)
    scene.add(gltf.scene)
})

```

if i run this code below it’ll be like the first pic,only m1 was loaded,at least only m1 is visible,cant see m2.

```javascript
new GLTFLoader().load(url,gltf=>{
    const m1 = gltf.scene
    m1.scale.set(0.01,0.01,0.01)
    const m2 = m1.clone()
    scene.add(m1)
    scene.add(m2)
})

```

i used to use this method once,it’s all works fine.but this time,i change multiple model,but all twisted.  
this eagle model is from here

```javascript
https://sketchfab.com/3d-models/white-eagle-animation-fast-fly-30203bf39e5145f19c79e83c550139d3

```

I also tried the following models

```javascript
https://sketchfab.com/3d-models/low-poly-bird-animated-82ada91f0ac64ab595fbc3dc994a3590

```

```javascript
https://sketchfab.com/3d-models/pc-spider-88f519a508ff42889deea7d17e652c23

```

---

<div class="post-metadata">

**Author:** ![looeee](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/looeee/32/59_2.png) [@looeee](https://discourse.threejs.org/u/looeee)\
**Post date:** [October 20, 2021, 2:26am UTC](https://discourse.threejs.org/t/question-about-loaded-resource/30971/4 "2021-10-20T02:26:04Z")

</div>

To clone a skinned mesh you need to use `SkeletonUtils.clone`:

> [@SkinnedMesh cloning issues](https://discourse.threejs.org/t/skinnedmesh-cloning-issues/27551/2):
>
> Perform the clone operation like so: const clone = SkeletonUtils.clone( skinnedMesh ); SkeletonUtils is part of the examples and located at examples/jsm/utils/SkeletonUtils.js.

---

<div class="post-metadata">

**Author:** ![JohnConstantine](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@JohnConstantine](https://discourse.threejs.org/u/JohnConstantine)\
**Post date:** [October 20, 2021, 3:06am UTC](https://discourse.threejs.org/t/question-about-loaded-resource/30971/5 "2021-10-20T03:06:57Z")

</div>

ah yes,now i know why this happens.Huge thanks!  
by the way,how can we tell if a model is skinnedMesh?

---

<div class="post-metadata">

**Author:** ![looeee](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/looeee/32/59_2.png) [@looeee](https://discourse.threejs.org/u/looeee)\
**Post date:** [October 20, 2021, 6:56am UTC](https://discourse.threejs.org/t/question-about-loaded-resource/30971/6 "2021-10-20T06:56:34Z")

</div>

You can log the `gltf.scene` to the console and look through it’s children. Or use traverse:

```javascript
gltf.scene.traverse((child) => {
    if(child.isSkinnedMesh) {
       // do stuff
   }
}

```

---

<div class="post-metadata">

**Author:** ![JohnConstantine](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@JohnConstantine](https://discourse.threejs.org/u/JohnConstantine)\
**Post date:** [October 20, 2021, 7:01am UTC](https://discourse.threejs.org/t/question-about-loaded-resource/30971/7 "2021-10-20T07:01:27Z")

</div>

Thanks a million！
