GitBrincie212 / Apel-Mod

Apel is a library that brings particle animations to the table with flexible behaviour and a clean developer interface. It promises also lots of predefined shapes & paths to help the developer on their particle scene
Other
2 stars 1 forks source link

Provide interceptors in `Animator`s #32

Closed DarthSharkie closed 2 months ago

DarthSharkie commented 2 months ago

Particle Objects have interceptor hooks available to modify the object during every frame. Animators need to have the same capability.

There are listeners, currently, that take several arguments. These should deprecate/evolve into interceptors that don't take so many arguments. Similar to objects, provide an AnimationContext that includes all the standard values. If there are custom properties or data needed, reuse the metadata approach to make those available.

Doing all of this implies a need to move the basic steps of rendering an animation into a common base class so that interceptors get called at the appropriate times.

This will also need thought to determine how best to handle interceptors on the tree-like animators (sequential and parallel) -- should both the parent and child animators have interceptors? Should there be additional hook points on the parent animators?

DarthSharkie commented 2 months ago

Fixed in https://github.com/GitBrincie212/Apel-Mod/commit/7a1ac8b96fe8f041cfa54687531b217cab2225e4.

Reuses the InterecptorData, which will work. Should still consider whether that's the right class to reuse or not, especially considering #30 and #34.