# FBX split animation sequence study

**URL:** <https://discourse.threejs.org/t/fbx-split-animation-sequence-study/5407>\
**Category:** Questions\
**Tags:** fbx-format, animation\
**Created:** [December 18, 2018, 11:17am UTC](https://discourse.threejs.org/t/fbx-split-animation-sequence-study/5407 "2018-12-18T11:17:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nego](https://avatars.discourse-cdn.com/v4/letter/n/8491ac/32.png) [@nego](https://discourse.threejs.org/u/nego)\
**Post date:** [December 18, 2018, 11:17am UTC](https://discourse.threejs.org/t/fbx-split-animation-sequence-study/5407/1 "2018-12-18T11:17:13Z")

</div>

Hello guys.  
I’m following the code from this example: [https://jsfiddle.net/baxshzrm/1/](https://jsfiddle.net/baxshzrm/1/)  
and made some changes:

```auto
function onKeys (event) {

event.preventDefault ();

var frame = clock.getDelta (); 

for (var i = 0; i < mixers.length; i ++) {
   mixers [i] .update (frame + 10 * +0.05);
}
}

window.addEventListener (“keypress”, onKeys, false);

```

I noticed that when you press a button any of the animation is skipping the keyframes, in this case (I think) 10 frames ahead, but without executing the other frames of the animation.  
I found it interesting, because if we can adjust it we can map animations to the file.  
I’m loading a .FBX template.

Would it be useful to study this? I would appreciate the help as I prefer working with fbx.  
…

---

<div class="post-metadata">

**Author:** ![nego](https://avatars.discourse-cdn.com/v4/letter/n/8491ac/32.png) [@nego](https://discourse.threejs.org/u/nego)\
**Post date:** [December 18, 2018, 11:41am UTC](https://discourse.threejs.org/t/fbx-split-animation-sequence-study/5407/2 "2018-12-18T11:41:03Z")

</div>

I also took a look at the AnimationMixer class but I could not quite understand what to do to stop counting frames or delimit counting.

---

<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:** [December 18, 2018, 12:41pm UTC](https://discourse.threejs.org/t/fbx-split-animation-sequence-study/5407/3 "2018-12-18T12:41:07Z")

</div>

The loaded animations are time based, not frame based.

You should rename `frame` to `delta`, it’s the time since you last called `clock.getDelta()`.

Which means that you are skipping ahead by the amount of time since you last pressed a key, plus 10\*0.05 = 0.5 seconds. Essentially, a random amount.

See this example for how to correctly play back FBX animations:

[https://threejs.org/examples/#webgl\_loader\_fbx](https://threejs.org/examples/#webgl_loader_fbx)

---

<div class="post-metadata">

**Author:** ![nego](https://avatars.discourse-cdn.com/v4/letter/n/8491ac/32.png) [@nego](https://discourse.threejs.org/u/nego)\
**Post date:** [December 18, 2018, 12:56pm UTC](https://discourse.threejs.org/t/fbx-split-animation-sequence-study/5407/4 "2018-12-18T12:56:07Z")

</div>

Right. Let see what i can get. For now, thancks.
