`AnimationEvent`s should be inspectable for a given clip
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
Bevy has a way to add events to animation clips with `add_event`/`add_event_to_target`, but there are some cases where you want to eagerly inspect, and potentially even modify, all the events that have been added to an animation clip. Some examples:
- Sanity-checking an animation to ensure that it only emits events of a certain predefined type, e.g. when loading a user-created model you might want to whitelist certain kinds of events
- Checking the timestamp of certain events to use as synchronisation markers, e.g. in a grab animation you may have certain moments that need to happen at the same time across multiple characters. A game can use the markers to automatically set playback speed in order to sync those moments up (for the record, this is what I need it for).
- Allowing users to implement "lead time" for certain events, e.g. if a character has an event in an animation that changes the weather, maybe the developer wants to start darkening the sky a little bit beforehand without going in and changing all the animation assets by hand
- A way to add arbitrary metadata to animation clips (particularly when loading assets), e.g. "this animation should only play when the entity is in this state", "this animation is only used if this enemy is the snowy variant of its enemy type". This is probably the least-compelling use-case, since it's not really what `add_event`/`add_event_to_target` is intended for (the timestamp would likely be ignored in this case) but it's something.
Contributor guide
Research direction
Start by tracing the animation clip APIs mentioned in the issue, especially add_event and add_event_to_target, and identify how their stored events are represented. Define how callers would inspect and modify all events, including their timestamps and targets; done means the animation clip exposes this capability without breaking existing event insertion or playback behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100