Add capybara

This commit is contained in:
2026-06-21 22:38:11 +02:00
parent d534e57ad2
commit 7e5536a02f
10 changed files with 153 additions and 45 deletions
+12 -2
View File
@@ -62,7 +62,17 @@ void Animator::addClip(std::shared_ptr<SkeletalAnimation> clip) {
void Animator::play(const std::string& name, float blendTime) {
auto it = m_clips.find(name);
if (it == m_clips.end()) return;
if (it == m_clips.end()) {
spdlog::warn("Animator::play failed. Clip '{}' not found.", name);
spdlog::info("Available clips:");
for (const auto& [clipName, _] : m_clips)
spdlog::info(" - '{}'", clipName);
return;
}
spdlog::info("Animator playing clip '{}'", name);
if (m_current.clip && blendTime > 0.f) {
m_previous = m_current;
@@ -73,7 +83,7 @@ void Animator::play(const std::string& name, float blendTime) {
m_blendT = 1.f;
}
m_current = { it->second.get(), 0.f, 1.f };
m_current = { it->second.get(), 0.f, 1.f };
m_currentClipName = name;
}