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

ParticleObject subclass standardization - thorough pass #9

Closed DarthSharkie closed 4 months ago

DarthSharkie commented 4 months ago

This is a complete (or nearly so) pass on all ParticleObject subclasses to ensure the following:

  1. beforeDraw and afterDraw are present, defaulted to the identity() implementation on initialization, reset to identity() if ever set to null, and invoked from doBeforeDraw and doAfterDraw methods.
  2. The ParticleEffect is named particleEffect so there's no confusion over what it means.
  3. drawPos is the name of the position passed in from the PathAnimatorBase implementation.
  4. Rotation and Offset are working correctly, without unintentional modification of internal vertices, rotations, offsets, etc.
  5. Before and after interceptors are actually called before and after the drawParticle or drawLine invocation(s), as appropriate.
  6. The returned ParticleObject from the interceptors is never referenced, since the user should not be able to replace the rendered object, only modify its properties.
  7. Unboxing from getMetadata should not throw NullPointerException if the user happened to set it to null.
  8. Constructors are telescoped such that there is a single "non-this" constructor and a single copy constructor.

I think that's it. Now, we should be able to get into more cool stuff, animators, pre-computing, performance, etc.