I've successfully loaded my model in aframe. I have animations with a bone. I wanted to load that. Or maybe just key frames.
How can I export my blender bone animations for aframe? How do I call those animations?
I've successfully loaded my model in aframe. I have animations with a bone. I wanted to load that. Or maybe just key frames.
How can I export my blender bone animations for aframe? How do I call those animations?
The OBJ format does not support animation, so you'll need to export to a different format if you want to play your animations.
My advice, if you're exporting from Blender to A-Frame, would be to use the Three.js JSON format. Three.js provides a Blender exporter for this. Once you have a JSON glTF file, including your animations, you can load the file in A-Frame using the json-model
(or perhaps object-model
)gltf-model
component, and animation-mixer
from A-Frame Extras.
Example syntax:
<a-entity scale="0.01 0.01 0.01"
animation-mixer
gltf-model="src: url(./my-model.glb);">
</a-entity>
UPDATE(11/7/2019): With A-Frame 0.7.0+, the glTF 2.0 format (supported in Blender 2.8 and other tools) is the recommended choice with A-Frame. Usage is the same as above, using the
gltf-model
component.