| 299 | } |
| 300 | |
| 301 | void Animation::loadGroups(vili::node& groups) |
| 302 | { |
| 303 | for (auto [groupName, group] : groups.items()) |
| 304 | { |
| 305 | Debug::Log->trace(" <Animation> Loading AnimationGroup '{}'", groupName); |
| 306 | m_groups.emplace(groupName, std::make_unique<AnimationGroup>(groupName)); |
| 307 | for (vili::node& currentTexture : group.at("content")) |
| 308 | { |
| 309 | Debug::Log->trace(" <Animation> Pushing Texture {} into group", |
| 310 | currentTexture.as<vili::integer>()); |
| 311 | m_groups[groupName]->pushTexture( |
| 312 | m_textures[currentTexture.as<vili::integer>()]); |
| 313 | } |
| 314 | |
| 315 | if (!group["clock"].is_null()) |
| 316 | { |
| 317 | const unsigned int delay = group.at("clock"); |
| 318 | Debug::Log->trace(" <Animation> Setting group delay to {}", delay); |
| 319 | m_groups[groupName]->setDelay(delay); |
| 320 | } |
| 321 | else |
| 322 | { |
| 323 | Debug::Log->trace( |
| 324 | " <Animation> No delay specified, using parent delay : {}", |
| 325 | m_delay); |
| 326 | m_groups[groupName]->setDelay(m_delay); |
| 327 | } |
| 328 | } |
| 329 | } |
| 330 | |
| 331 | void Animation::loadCode(vili::node& code) |
| 332 | { |
no test coverage detected