Home > Software engineering >  Model from sketchfab not animating in aframe
Model from sketchfab not animating in aframe

Time:04-28

Link

https://glitch.com/edit/#!/internal-electric-shear

I downloaded the unicorn from sketchfab and converted blender file to .glb. For some reason, animation mixer is not triggering the animation. I tried putting my glb file in other online viewers and they run fine there. The animation I am looking for is called Run but nothing is working.

CodePudding user response:

The animation-mixer is part of the aframe-extras - You need to import it to use it:

<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/donmccurdy/[email protected]/dist/aframe-extras.min.js"></script>

<a-scene>
  <a-entity position="2 0 -10" 
              gltf-model="https://cdn.glitch.global/bbcb6dde-bc53-4acb-b787-7018cc092b28/Unicorn_blenderfile.glb" 
              animation-mixer="clip:Run ; loop:true">
  </a-entity>
  <a-sky color="#ECECEC"></a-sky>
</a-scene>

Model by Mysticreator (without textures though)

CodePudding user response:

Animation-mixer you used is not a default feature of a-frame. It's a part of aframe extras by donmccurdy

  <script src="https://cdn.jsdelivr.net/gh/donmccurdy/[email protected]/dist/aframe-extras.min.js"></script>

also use correct name in animation mixer attribute exactly same as mentioned in sketchfab website

<a-entity  gltf-model="./unicorn.gltf" animation-mixer="clip:walk">
  • Related