json - A 框架动画混合器。如何在 json 模型动画剪辑之间平滑过渡?

标签 json animation model three.js aframe

我最近刚刚开始使用 A-Frame,我有一个关于动画混合器的问题。

我正在开发一个 webVR 项目,我需要为一个已装配的 json 模型制作动画。 到目前为止,我已加载模型并在空闲状态下设置动画:

<a-entity    
            id ="myModel"
            scale="1 1 1"
            position="1 0 -2"
            rotation="0 0 0"
            animation-mixer="clip: idle"   
            json-model="src: url(/models/json/myModel.json);">

</a-entity>

我可以通过设置属性将动画状态更改为运行之类的状态:

document.querySelector('#myModel').setAttribute("animation-mixer","clip: run");

但是这样做会导致动画突然发生变化。 有没有办法混合动画,使其过渡更平滑?

我尝试过研究 Three.js,看起来这是可能的,但我只是不确定如何使用 A 框架来实现它。 任何代码片段或示例链接都会有巨大的帮助。

谢谢!

最佳答案

好心的 Don McCurdy 更新了他的动画混合器组件,现在这成为可能。一探究竟。包含指向工作示例的链接。

https://github.com/donmccurdy/aframe-extras/tree/master/src/loaders

:)

关于json - A 框架动画混合器。如何在 json 模型动画剪辑之间平滑过渡?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43682245/

相关文章:

animation - Angularjs ng-animate 移动示例?

javascript - D3 : Animate circle along border of country on spinning globe

python - django 如何从同一模型中获得多个外键

php - Yii2和名为user_type的表与用户表的用户模型的关系问题

json - 找不到使用 Json 的类的序列化程序

javascript - php多维数组到javascript无法通过循环访问

php - 如何加载关联数组

Javascript-Applet通信: how to pass return values back to Javascript

android - 在安卓 : How to define proper Animation to maximize one View while minimizing 2 others at the same time?

php - Laravel Controller 获取限制数量的项目