hiukim / mind-ar-js

Web Augmented Reality. Image Tracking, Face Tracking. Tensorflow.js
MIT License
2.13k stars 391 forks source link

Selecting a gltf animation #534

Open NahuelGerthVK opened 1 week ago

NahuelGerthVK commented 1 week ago

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/aframe-extras@6.1.0/dist/aframe-extras.min.js"></script>
  2. 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