Skip to content
Snippets Groups Projects
Commit 3ac43d3e authored by ReformCopyright's avatar ReformCopyright
Browse files

Optimize animation handling.

* Drop unnecessary check that the image src is what the sprite definition says, which it never is because Image.src becomes an absolute URI, and this caused the sprite to be loaded over and over.
* Don't call window.requestAnimationFrame unless there's a custom pose with animations.
* Stop calling window.requestAnimationFrame when all animations are done.
* Call window.cancelAnimationFrame when clearing the pose and an animation is ongoing.
parent 445577c5
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment