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

Simplify `CircularAnimator` calculations #55

Closed DarthSharkie closed 1 month ago

DarthSharkie commented 1 month ago

Trimming now describes the portion of the circle (a single arc) that should be rendereed. The animator does check all points (subject to steps/interval) around the circle, and schedules/renders those that the trim arc contains. Zero and 2pi should be treated equally since they refer to the same point on the circle.

All calculations are bounded by [0, 2pi). This means all animations start at 0 if clockwise, and 2pi if counterclockwise. Due to skipping handleDrawingStep when trimmed, animations that trim out the reference point (0 or 2pi) appear to start immediately at the point on the circle that is no longer trimmed. Animations that keep the reference point, but trim a different part of the circle will start at the reference point, disappear when entering the trim arc, and reappear after exiting the trim arc.

The class level documentation received a complete re-write to explain all of this.