Skip to content

Commit b1efbc3

Browse files
authored
Merge pull request #71 from devscafecommunity/39-skeletal-animation
feat(skeletal-animation): implement Bone/Skeleton, keyframe interpolation, blend tree, and ECS system
2 parents b364116 + e305f90 commit b1efbc3

5 files changed

Lines changed: 794 additions & 5 deletions

File tree

docs/fase5/skeletal-animation.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
> **Fase:** 5 — Transição Dimensional
44
> **Namespace:** `Caffeine::Animation`
55
> **Arquivo:** `src/animation/SkeletalAnimation.hpp`
6-
> **Status:** 📅 Planejado
6+
> **Status:** ✅ Implementado
77
88
---
99

@@ -173,10 +173,14 @@ anim.blendTree = &runBlend;
173173

174174
## Critério de Aceitação
175175

176-
- [ ] Animação esquelética com 60fps em 10 personagens simultâneos
177-
- [ ] Blend tree interpola suavemente entre walk/run
178-
- [ ] Bone matrices corretas (comparadas com referência glTF)
179-
- [ ] Skinning vertex shader produz deformação correta
176+
- [x] Estruturas Bone, Skeleton, SkeletalKeyframe, SkeletalClip implementadas
177+
- [x] `sampleAt` interpola posição (lerp), rotação (slerp) e escala (lerp) entre keyframes
178+
- [x] Hierarquia de bones: matrizes mundo propagadas de pais para filhos
179+
- [x] Bone matrices finais: world * inverseBindPose para skinning GPU
180+
- [x] Blend tree (Blend1D) interpola entre múltiplos clipes por parâmetro
181+
- [x] State machine com transições (reutilizando AnimationTransition da Fase 4)
182+
- [x] Sistema ECS (SkeletalAnimationSystem) processa componentes SkeletalAnimator
183+
- [x] Testes automatizados com 15 casos de teste (keyframes, hierarquia, blend, clip)
180184

181185
---
182186

src/Caffeine.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
// Animation
8282
#include "animation/AnimationComponents.hpp"
8383
#include "animation/AnimationSystem.hpp"
84+
#include "animation/SkeletalAnimation.hpp"
8485

8586
// Mesh (3D)
8687
#include "ecs/Components3D.hpp"

0 commit comments

Comments
 (0)