Donner SVG Editor & Engine
SVG-native editor and embeddable SVG2 + CSS3 engine in C++20, with GPU (WebGPU) and compact CPU renderers, built for correctness, security, and performance.
Loading...
Searching...
No Matches
donner::svg::components::AnimationSystem Class Reference

System that advances SVG animations based on the current document time. More...

#include "donner/svg/components/animation/AnimationSystem.h"

Public Member Functions

void advance (Registry &registry, double documentTime, std::vector< ParseDiagnostic > *outWarnings=nullptr)
 Advance all animations to the given document time.

Detailed Description

System that advances SVG animations based on the current document time.

Runs after style computation but before layout, so that animated property values are applied before layout-dependent computations.

For each animation entity:

  1. Resolves the target entity (from href or parent).
  2. Computes timing: determines if the animation is before/active/after.
  3. For active <set> animations, stores the override value on the target entity.
  4. For frozen animations (fill="freeze"), persists the final value.
  5. For removed animations (fill="remove"), clears the override.

Member Function Documentation

◆ advance()

void donner::svg::components::AnimationSystem::advance ( Registry & registry,
double documentTime,
std::vector< ParseDiagnostic > * outWarnings = nullptr )

Advance all animations to the given document time.

Parameters
registryThe ECS registry.
documentTimeThe current document time in seconds.
outWarningsIf non-null, warnings will be added to this vector.

The documentation for this class was generated from the following file: