`AnimatedSprite`: `onComplete` never fires
See original GitHub issueI have a three-frame animation stored in frames
. I’d expect that this code would fire whenever the third frame is reached:
const jack = new PIXI.extras.AnimatedSprite(frames);
jack.onComplete = () => {
console.log("complete");
};
jack.play();
However, it doesn’t look like it’s ever fired. onFrameChange
, on the other hand, seems to work as expected, so I’m sure that I’m using onComplete
the right way.
Is this a bug or am I doing something wrong?
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
AnimatedSprite : onComplete never fires #4072 - GitHub
I have a three-frame animation stored in frames. I'd expect that this code would fire whenever the third frame is reached: const jack...
Read more >onComplete never fires or the animation just breaks - GSAP
Hi so I am trying to get an on complete call back when the animation is finished but it just won't work when...
Read more >PIXI.js AnimatedSprite lag on first play - Stack Overflow
1) The lag might be caused by the time taken to upload the textures to the GPU. There is a PIXI plugin called...
Read more >How to make spine's onComplete event fires while losing tab ...
As I tested, if I run several spine animations(different length) at the same time, then switch to another tab immediately, the onComplete events ......
Read more >AnimatedSprite animation not waiting to complete before ...
I dont know why.... I have things broken down into idle, turn and move states, and I want to have the 2 frame...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It makes sense for onComplete not to fire if the animation is looped. A new onLoop callback would be a welcome PR imo. You can’t rely on onFrameChange for a specific frame index in case the frame rate is low and you never actually hit that specific frame index
I can do that tomorrow