# Get keyframe from animation

**URL:** <https://forum.babylonjs.com/t/get-keyframe-from-animation/23462>\
**Category:** Questions\
**Created:** [August 31, 2021, 11:31am UTC](https://forum.babylonjs.com/t/get-keyframe-from-animation/23462 "2021-08-31T11:31:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kuangzheng\_Xia](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/kuangzheng_xia/32/17495_2.png) [@Kuangzheng\_Xia](https://forum.babylonjs.com/u/Kuangzheng_Xia)\
**Post date:** [August 31, 2021, 11:31am UTC](https://forum.babylonjs.com/t/get-keyframe-from-animation/23462/1 "2021-08-31T11:31:06Z")

</div>

![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/a/6/a60a070166151839b2059de7b8aa0b2fda12a8f5.png)  
Above is an animation curve, how can I get the keyframe value from BJS? The following code will print all keys but not the key frame.

```auto
const POIs = scene.getNodeByName("POIs")
  // var cameraPOIs = POIs.getChildren()[0]
  let POIsAnimation = POIs.animations[0];
  var POIsKeyList = POIsAnimation.getKeys();
  console.log(POIsKeyList[5])

  for (let i=0;i<POIsKeyList.length;i++){
    console.log(POIsKeyList[i])
  }

```

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [August 31, 2021, 12:45pm UTC](https://forum.babylonjs.com/t/get-keyframe-from-animation/23462/2 "2021-08-31T12:45:19Z")

</div>

getKeys will return a list of `IAnimationKey` items, which is this interface -

> **[IAnimationKey | Babylon.js Documentation](https://doc.babylonjs.com/typedoc/interfaces/babylon.ianimationkey)**
>
> Defines an interface which represents an animation key frame \[API\]

What information do you need that is not there?

---

<div class="post-metadata">

**Author:** ![Kuangzheng\_Xia](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/kuangzheng_xia/32/17495_2.png) [@Kuangzheng\_Xia](https://forum.babylonjs.com/u/Kuangzheng_Xia)\
**Post date:** [September 5, 2021, 12:40am UTC](https://forum.babylonjs.com/t/get-keyframe-from-animation/23462/3 "2021-09-05T00:40:26Z")

</div>

In c4d, In the beginning, I create ten keys and values;  
In c4d, Using animation curve tool to make it easing function;  
In BJS, there are 100+ key-value pairs as It calculates all key-value after adopting easing function;

In the sandbox, I can see the initial key-value is marked at the black point; is it possible to get the black point value;

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [September 6, 2021, 10:23am UTC](https://forum.babylonjs.com/t/get-keyframe-from-animation/23462/4 "2021-09-06T10:23:17Z")

</div>

The points will recalculate only unders specific circumstances. If you run an animation it will not increase the number of keys:

[PGDemo | Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#8ZNVGR#84)

Are they exported like that? or are you loading low number of keys and babylon re-calculates it? Can you show a playground hwere that happens

---

<div class="post-metadata">

**Author:** ![Kuangzheng\_Xia](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/kuangzheng_xia/32/17495_2.png) [@Kuangzheng\_Xia](https://forum.babylonjs.com/u/Kuangzheng_Xia)\
**Post date:** [September 7, 2021, 1:37am UTC](https://forum.babylonjs.com/t/get-keyframe-from-animation/23462/5 "2021-09-07T01:37:29Z")

</div>

I believe the issue is coming from c4d exporter. It will export all keys after the easing function as there is no easing function concept in c4d.

Thank you so much for supporting me.

> [@RaananW](#):
>
> Are they exported like that?
