簡體   English   中英

特定於 A 幀的動畫

[英]A-frame specific animations

我在我的 A 幀場景 anf 中使用了 gltf model,因為 model 有超過 1 個可用動畫,我想知道如何指定播放哪個 Z6F1C25ED1523962F1BBF9DEE9BE5092。 這是我的 model 的代碼:

       <a-gltf-model
scale="0.1 0.1 0.1"
      src="https://cdn.glitch.com/18a85eac-a71c-4578-ad89-80f59b3a68c3%2Fscene%20(95).glb?v=1619716622287" nimation-mixer="clip:Take 001; loop:2; timeScale: 1; crossFadeDuration: 1"
              animation__position1="
                property: position;
                from: 0 0 0;
                to: 0 0 -5;
                dur: 5000;
                easing: linear;
                autoplay: true;"
            animation__position2="
                property: position;
                from: 0 0 -5;
                to: 5 0 -5;
                dur: 5000;
                easing: linear;
                startEvents: animationcomplete__position1">
        </a-gltf-model>

這是我從sketchfab下載的model: https://sketchfab.com/3d-models/sci-fi-camera-drone-3dbf07385d1b471a96dce6de6cba97d

animation 目前無法正常工作,我想知道如何讓 model 像在 sketchfab 中一樣制作動畫。

您可以使用animation-mixer組件播放gltf-model動畫

 <html> <head> <script src="https://aframe.io/releases/1.2.0/aframe.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/donmccurdy/aframe-extras@v6.1.1/dist/aframe-extras.min.js"></script> </head> <body> <a-scene> <a-entity gltf-model="https://gftruj.github.io/webzamples/aframe/assets/models/mech_drone/scene.gltf" scale="0.01 0.01 0.01" position="0 0.5 -3" rotation="0 180 0" animation-mixer></a-entity> </a-scene> </body> </html>


威利·德卡彭特里的 Model


播放特定動畫需要指定剪輯:

animation-mixer="clip: walk"

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM