Closed DarthSharkie closed 4 months ago
This is going to be a problem for the similar constructor that has an array of curves but a single renderingInterval
, too. Both of these are probably intended to re-use the steps/interval for each curve. (Again, solve this with the SequentialAnimator!)
The same thing happens for LinearAnimator
when using the array of endpoints with a primitive quantum (steps/interval).
Fixed for LinearAnimator: https://github.com/GitBrincie212/Apel-Mod/pull/27/commits/ce2abb8cb58b84f7ec531f22bb18c09aeab5b41e.
PR submitted: https://github.com/GitBrincie212/Apel-Mod/pull/27
Both PRs merged
The constructor (below) creates an array for
renderingSteps
that is exactly one element regardless of the length ofendpoints
: https://github.com/DarthSharkie/Apel-Mod/blob/main/src/main/java/net/mcbrincie/apel/lib/animators/BezierCurveAnimator.java#L97-L113.That leads to an AIOOBE here: https://github.com/DarthSharkie/Apel-Mod/blob/main/src/main/java/net/mcbrincie/apel/lib/animators/BezierCurveAnimator.java#L293-L295.
I think the problem is simply a poor constructor signature, but there's also an argument to be made that the Sequential Animator should be used instead of an array of Bézier curves.