AdaRoseCannon / aframe-xr-boilerplate

Get started quickly with VR and AR using AFrame
https://aframe-xr-starterkit.glitch.me/
MIT License
110 stars 20 forks source link

GLTF animations #16

Closed Javiavan closed 12 months ago

Javiavan commented 1 year ago

I have animations in the glb, but it doesn't work. Any ideas?

vincentfretin commented 1 year ago

Do you have the animation-mixer component from aframe-extras set on your entity?

Javiavan commented 1 year ago

Yeah, I have it like this: `

<script src="https://cdn.jsdelivr.net/gh/c-frame/aframe-extras@fb96ab2/dist/components/sphere-collider.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/c-frame/aframe-extras@fb96ab2/dist/aframe-extras.controls.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/c-frame/physx@v0.1.0/dist/physx.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/aframe-blink-controls@0.4.3/dist/aframe-blink-controls.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/handy-work@3.1.10/build/handy-controls.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/handy-work@3.1.10/build/magnet-helpers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/aframe-htmlmesh@2.0.1/build/aframe-html.min.js"></script>`

`

      <a-gltf-model src="#building-glb"
                        id="building"
                        lightmap="src:#bake;intensity: 0; filter:Window,Ceiling,floor;"
                        depthwrite="true"
                        window-replace="Glass"
                        no-tonemapping="Light"
                        shadow="cast:false;receive:true;" animation-mixer></a-gltf-model>
  </a-entity>`
Javiavan commented 1 year ago

Ok, i found the solution. I lacked: <script src="https://cdn.jsdelivr.net/gh/c-frame/aframe-extras@7.0.0/dist/aframe-extras.min.js"></script> thanks vincent