# Bug with animation in GLTFLoader ? I have no animation

**URL:** <https://discourse.threejs.org/t/bug-with-animation-in-gltfloader-i-have-no-animation/5170>\
**Category:** Questions\
**Tags:** colladaloader, loaders\
**Created:** [November 29, 2018, 9:24am UTC](https://discourse.threejs.org/t/bug-with-animation-in-gltfloader-i-have-no-animation/5170 "2018-11-29T09:24:16Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sts\_1994](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@sts\_1994](https://discourse.threejs.org/u/sts_1994)\
**Post date:** [November 29, 2018, 9:24am UTC](https://discourse.threejs.org/t/bug-with-animation-in-gltfloader-i-have-no-animation/5170/1 "2018-11-29T09:24:16Z")

</div>

I import an object from .fbx format to .glb format using a converter

> **[Convert 3D models to GLTF](https://blackthread.io/gltf-converter/)**
>
> glTF is the up and coming superstar of 3D model formats. It’s being adopted as the standard format by many 3D applications and game engines, and is especially prominent as the format of choice for web applications. Use this tool to convert from...

In converter there is a result of model in glb format with animation

but when I import an object in three.js with GLTFLoader gltf , I have no animation

https://codepen.io/anon/embed/preview/vQQXRb?height=300&slug-hash=vQQXRb&default-tabs=html,result&host=https://codepen.io

Why ?

object in fbx

[main-2.fbx](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/f/f5789a17dfb8271b5ca12ecd4f6b540962406713.fbx) (845.8 KB)

---

<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:** [November 29, 2018, 10:58am UTC](https://discourse.threejs.org/t/bug-with-animation-in-gltfloader-i-have-no-animation/5170/2 "2018-11-29T10:58:33Z")

</div>

Here’s the converted .glb file for anyone else looking at this:

[main-main.glb](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/5/51523e47f41ea7ce4c19088a3c0f583d97d240b1.glb) (3.1 MB)

It seems to be working fine to me, testing here:

> **[Quickly Load And Test Your Models With three.js!](https://discoverthreejs.com/apps/loader/)**
>
> Viewer for glTF, FBX and Collada (DAE) files. Always using loaders from the latest version of three.js.

@sts_1994 you can’t load the file on codepen like that due to cross-origin errors (check your browser console).

Try setting up a local dev server and running it there. See the [How To Run Things Locally](https://threejs.org/docs/#manual/en/introduction/How-to-run-things-locally) guide for more info.

---

<div class="post-metadata">

**Author:** ![sts\_1994](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@sts\_1994](https://discourse.threejs.org/u/sts_1994)\
**Post date:** [November 29, 2018, 11:06am UTC](https://discourse.threejs.org/t/bug-with-animation-in-gltfloader-i-have-no-animation/5170/3 "2018-11-29T11:06:25Z")

</div>

No, I have a model in codepen and haven’t have error Acces Alllow origin (i have a plugin for it)

My model hasn’t got an animation and it’s view is not similar as [https://blackthread.io/loader/](https://blackthread.io/loader/)

![image](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex035/uploads/threejs/original/2X/e/e667202bf881021aab837c9be31fb11acd016f02.png)

---

<div class="post-metadata">

**Author:** ![sts\_1994](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@sts\_1994](https://discourse.threejs.org/u/sts_1994)\
**Post date:** [November 29, 2018, 11:08am UTC](https://discourse.threejs.org/t/bug-with-animation-in-gltfloader-i-have-no-animation/5170/4 "2018-11-29T11:08:44Z")

</div>

You can load this model in [github.io](http://github.io) and see, if you have a problem with Access allow origin

this model with no animation if I use GLTFLoader from three js loaders example

---

<div class="post-metadata">

**Author:** ![sts\_1994](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@sts\_1994](https://discourse.threejs.org/u/sts_1994)\
**Post date:** [November 29, 2018, 11:13am UTC](https://discourse.threejs.org/t/bug-with-animation-in-gltfloader-i-have-no-animation/5170/5 "2018-11-29T11:13:11Z")

</div>

what the version of GLTF Loader I can use ? If the current version is in npm ?

My final result

https://codepen.io/anon/embed/preview/gQQRMG?height=300&slug-hash=gQQRMG&default-tabs=html,result&host=https://codepen.io

The model is not as in converter view and has no animation

---

<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:** [November 29, 2018, 12:56pm UTC](https://discourse.threejs.org/t/bug-with-animation-in-gltfloader-i-have-no-animation/5170/6 "2018-11-29T12:56:40Z")

</div>

> [@sts\_1994](#):
>
> what the version of GLTF Loader I can use

Use this one:

[https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/GLTFLoader.js](https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/GLTFLoader.js)

It’s the same one used here: [https://gltf-viewer.donmccurdy.com/](https://gltf-viewer.donmccurdy.com/)

Your model works fine in @donmccurdy’s viewer using the latest GLTFLoader.

Looking through your code, you are not playing back the animations. See this example for details on how to set up animations on a gltf model - [three.js examples](https://threejs.org/examples/#webgl_loader_gltf_extensions)

Specifically, these lines:

> <https://github.com/mrdoob/three.js/blob/5360a81b8c557ed255e97b87c49e7d00b546b795/examples/webgl_loader_gltf_extensions.html#L357-L381>

> <https://github.com/mrdoob/three.js/blob/5360a81b8c557ed255e97b87c49e7d00b546b795/examples/webgl_loader_gltf_extensions.html#L403-L413>

---

<div class="post-metadata">

**Author:** ![sts\_1994](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@sts\_1994](https://discourse.threejs.org/u/sts_1994)\
**Post date:** [November 29, 2018, 12:59pm UTC](https://discourse.threejs.org/t/bug-with-animation-in-gltfloader-i-have-no-animation/5170/7 "2018-11-29T12:59:05Z")

</div>

Thank you.Animation works.

---

<div class="post-metadata">

**Author:** ![sts\_1994](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@sts\_1994](https://discourse.threejs.org/u/sts_1994)\
**Post date:** [November 29, 2018, 1:01pm UTC](https://discourse.threejs.org/t/bug-with-animation-in-gltfloader-i-have-no-animation/5170/8 "2018-11-29T13:01:15Z")

</div>

if the last version is in npm ?

> <https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/GLTFLoader.js>
