Evaluates declarative SVG animation elements at a document time and applies their values.
More...
#include "donner/svg/components/animation/AnimationSystem.h"
|
| void | advance (Registry ®istry, double documentTime, std::vector< ParseDiagnostic > *outWarnings=nullptr) |
| | Advance all animations to the given document time.
|
| bool | isAnimationTarget (Registry ®istry, Entity targetEntity) const |
| | Return true when any animation element targets targetEntity.
|
| bool | dispatchMouseEvent (Registry ®istry, Entity targetEntity, EventType type, double documentTime) |
| | Apply declarative begin/end mouse-event triggers to animation runtime state.
|
| bool | dispatchEvent (Registry ®istry, Entity targetEntity, std::string_view name, bool bubbles, double documentTime) |
| | Deliver a host event name to declarative timing.
|
Evaluates declarative SVG animation elements at a document time and applies their values.
◆ 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
-
| registry | The ECS registry. |
| documentTime | The current document time in seconds. |
| outWarnings | If non-null, warnings will be added to this vector. |
◆ dispatchEvent()
| bool donner::svg::components::AnimationSystem::dispatchEvent |
( |
Registry & | registry, |
|
|
Entity | targetEntity, |
|
|
std::string_view | name, |
|
|
bool | bubbles, |
|
|
double | documentTime ) |
Deliver a host event name to declarative timing.
- Parameters
-
| registry | Document storage. |
| targetEntity | Target element. |
| name | Event name; no script is executed. |
| bubbles | Whether ancestors receive the event. |
| documentTime | Current clock time. |
- Returns
- Whether a runtime instance was retained.
◆ dispatchMouseEvent()
| bool donner::svg::components::AnimationSystem::dispatchMouseEvent |
( |
Registry & | registry, |
|
|
Entity | targetEntity, |
|
|
EventType | type, |
|
|
double | documentTime ) |
Apply declarative begin/end mouse-event triggers to animation runtime state.
- Parameters
-
| registry | Document storage. |
| targetEntity | Hit element receiving the event. |
| type | Mouse event type. |
| documentTime | Event time in document seconds. |
- Returns
- True when an animation interval changed.
◆ isAnimationTarget()
| bool donner::svg::components::AnimationSystem::isAnimationTarget |
( |
Registry & | registry, |
|
|
Entity | targetEntity ) const |
Return true when any animation element targets targetEntity.
An animation targets the entity named by its href, or its own parent when href is absent, so a container holding an animation element is a target without naming itself anywhere. References are resolved against the attached document without mutating animation state. Resource exhaustion conservatively returns true so structure-preserving edits cannot treat incomplete analysis as proof that an element is unobserved.
- Parameters
-
| registry | The ECS registry. |
| targetEntity | Entity to test. |
- Returns
- True for a target or incomplete analysis; false only for a proven non-target.
The documentation for this class was generated from the following file: