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
Non-looped animation doesn't work. #4377
Comments
Thanks for reporting the issue. |
Btw, the API has changed: animations[ i ].loop = false;
animations[ i ].play(); |
Thank you so much for the fix. I did some testing and noted that this.currentTime wont get to reset when first animation loop is completed. This will trigger Animation.reset function call each time Animation.update is being called. I tracked possible issue from given code
and added a possible fix for the issue
|
Ah, wait. It should be this: if ( currentTime > duration ) {
this.reset();
if ( this.loop === false ) {
this.stop();
}
} Will fix! |
Actually. That doesn't really fix it. |
Ok. Now should be fixed O:) |
If animation.play(false) is used, it will get stop call after first two frames are interpolated.
I tested this with "#webgl_animation_skinning" example where I used animations[ i ].play(false) instead of animations[ i ].play().
Tested with latest master. SHA-1: 4862f5f * r65 in localhost.
I did some debugging and found a possible error in Animation.update function line: 167 where "if ( currentTime <= unloopedCurrentTime )" is true when it should be false. This didn't cause any errors in looped animation since looped animation never get stopped when loop is completed.
The text was updated successfully, but these errors were encountered: