Animated GLB Models
GLB/glTF 2.0 models with embedded animations now work on both platforms. Three animation systems are supported:
| System | Description |
|---|---|
| Skeletal animation | Bone-driven character and creature rigs (single active animation at a time; layered/blended animations not yet supported) |
| Morph targets | Blend-shape facial animation and shape keys |
| Skinning | Vertex-weight deformation tied to a skeleton |
No new props are required. Animations embedded in the file are automatically available as named clips via the existing animation prop or ViroAnimatedComponent.
<Viro3DObject
source={require("./character.glb")}
type="GLB"
position={[0, 0, -2]}
scale={[0.5, 0.5, 0.5]}
animation={{
name: "Walk",
run: true,
loop: true,
onFinish: () => setAnimation("Idle"),
}}
/>
Animation names are defined by the artist in the GLB file. Multiple animations can be embedded in a single file and switched at runtime by changing the name.
Updated about 3 hours ago