我正在尝试控制(开始/停止)鼠标悬停时的 gtlf 动画。我找到了一个很好的例子,但它依赖于 .json 格式的模型:
例子:https://rexraptor08.github.io/animation-controls/ https://rexraptor08.github.io/animation-controls/
Source: https://github.com/rexraptor08/animation-controls https://github.com/rexraptor08/animation-controls
问题是我不再能够从搅拌机导出 .json 格式,因为插件已被删除:https://github.com/mrdoob/ Three.js/tree/dev/utils/exporters/blender https://github.com/mrdoob/three.js/tree/dev/utils/exporters/blender
有人知道如何实现这一目标吗?
您可以使用 glTF 动画动画混合器 https://github.com/Kupoman/blendergltf成分。
首先,您需要导出模型库波曼的出口商 https://github.com/Kupoman/blendergltf。我使用过 Khronos 第一组,但它在导出具有多个动画的模型时遇到问题。
导出模型后,只需包含框架附加 https://github.com/donmccurdy/aframe-extras/tree/master/src/loaders,这样你就可以使用动画加载器了。
然后你可以像这样使用它:
<a-entity gltf-model="url(model.gltf)"
animation-mixer="clip: DoStuff;"></a-entity>
如果你想用任何事件启动动画,只需创建一个成分 https://aframe.io/docs/0.8.0/core/component.html#register-a-component,这将设置animation-mixer
:
this.el.addEventListener("click", (e)=> {
this.el.setAttribute("animation-mixer", "clip", "DoStuff")
})
另请务必查看唐·麦柯迪斯 (Don McCurdys)guide https://www.donmccurdy.com/2017/11/06/creating-animated-gltf-characters-with-mixamo-and-blender/.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)