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

Animators cleanup in prep for builders #49

Closed DarthSharkie closed 1 month ago

DarthSharkie commented 1 month ago

This cleans up several things on animators in preparation to move to builders:

  1. Use ParticleObject<? extends ParticleObject<?>> as the type. This ensures that only classes inheriting from ParticleObject may be used when subclassing and using it generically.
  2. The animation interceptor was using a camelCase name instead of PascalCase, so fix that across all animators.
  3. PathAnimatorBase was somewhat disorganized with getters/setters, so order those to group getter/setter together.
  4. There were a few mismatches between properties and getter/setter names, so align those.
  5. Fixes bugs in AnimationTrimming where the wrong variables were set and returned.
  6. Remove unused methods from PathAnimatorBase and BezierCurveAnimator.
  7. Leverage getMetadata's ability to default a value of a known type to prevent casting.
  8. Simplifies LinearAnimator using the pattern from BezierCurveAnimator; they're identical in structure -- the only difference is the segment type. There's possibility for future refactoring/inheritance/interface here.