Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selecting a gltf animation #534

Open
NahuelGerthVK opened this issue Jun 18, 2024 · 1 comment
Open

Selecting a gltf animation #534

NahuelGerthVK opened this issue Jun 18, 2024 · 1 comment

Comments

@NahuelGerthVK
Copy link

NahuelGerthVK commented Jun 18, 2024

Hi there :-)

I implemented an animated .glftf file with the animation-mixer component:

  1. add the script
<!-- Load animation-mixer component -->
<script src="https://cdn.jsdelivr.net/gh/donmccurdy/[email protected]/dist/aframe-extras.min.js"></script>
  1. add animation-mixer property
<a-gltf-model
          rotation="90 0 0"
          position="0 0 0"
          scale="0.2 0.2 0.2"
          src="#avatarModel"
          animation-mixer>
</a-gltf-model>

Now here is my problem: how can I select a specific animation? When I open the file in gltf view it shows that there are multiple animations (1-4). Is there a way to select one of these for the animation mixer property?

Thanks,
Nahuel

@SantaCRC
Copy link

Hi, you can use the clip argument of the animation-mixer component like it says in the docs, as an example:
<a-gltf-model src="#my_model" animation-mixer="clip: name_of_animation"></a-gltf-model>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants