Jump to content

Babylon animation vs animationClip


MadnessOfMadara
 Share

Recommended Posts

While fiddling around with the examples, I opened the dummy3.babylon of the weighted animation example and found that it does not have "animation", but has animationClips? Trying to access animation through the animations property gives you an error as the property is undefined, but you can get the animationClips from the AnimationRange method. I am curious how this is possible and the pros and cons.

Link to comment
Share on other sites

Hi @MadnessOfMadara.  An animationClip in Babylon.js is an AnimationGroup.  This allows you to have a set of animations that are separated from a mesh.  The advantage of this is that you can apply the animation group to multiple meshes.  You would have to make sure that the properties that the animation group targets are available on the mesh.  The other advantage of an AnimationGroup is that collections of animations can be played simultaneously, and you can specify the range to play the animations.

You can also apply animations directly to the mesh, but you lose the flexibility of sharing the same animations to other meshes.  Plus you would have to rely on the scene to play all the animations.  Though this is fine as long as you do not need to share animations.

 

Here is a sample playground: http://playground.babylonjs.com/#HLZYVM#1

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...