New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validate frameIndex in Animation #184
Comments
The math in I've changed mentions of |
Re issue #184 The last fix was not so good. It fixed problems with `onLoop` and `onComplete`, but it did it by avoiding `onLoop` and `onComplete` entirely. The new fix employs mathematically rigorous methods to ensure that the `_frameIndex` property is within bounds before any external code is called. This should ensure that everything is fully functional at last. Also rebuilt some docs.
The last fix was not so good. It fixed problems with The new fix employs mathematically rigorous methods to ensure that the |
Still re issue #184 In the race circumstance that the animation initialised on a negative frame count equal to the positive length, the code would set `frameCount=length`. This is an out-by-one error. The erroneous code which set negative frame indices to nominally in-range positive indices read: this.length + this._frameIndex % this.length The fix was to re-remainder the results: ( this.length + this._frameIndex % this.length ) % this.length
I've run into some odd issues with animations - they'll occasionally and unpredictably report an error, claiming that an invalid cell index was passed.
Long story short, it seems that sometimes, when creating animations during callbacks, they might occasionally have a negative
frameIndex
, and this causes a frame's worth of bork.The text was updated successfully, but these errors were encountered: