question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

animatedSprite.onComplete is not a function

See original GitHub issue

Hi, I’d like to use the animatedSprite.onComplete function but the documentation is not clear and I can’t figure out how it is supposed to work.

Current documentation : https://pixijs.download/dev/docs/PIXI.AnimatedSprite.html#onComplete

I’ve seen that sometimes, there’s a small example to explain how a function work but here, there’s none.

I tried this code: animatedSprite.play(); animated_Sprite.onComplete(function () { animatedSprite.visible = false; });

But Firefox 75 console returns: TypeError: animatedSprite.onComplete is not a function

I’m using PixiJS 5.1.6, development build.

I don’t understand how this is supposed to work. Maybe I didn’t get something. Can you update the documentation by giving an example, please ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
lululock71commented, Apr 8, 2020

Thanks for the fast answer. Can you update the documentation for future users ?

0reactions
stale[bot]commented, Jul 10, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

animatedSprite.onComplete is not a function #6536 - GitHub
Hi, I'd like to use the animatedSprite.onComplete function but the documentation is not clear and I can't figure out how it is supposed...
Read more >
PIXI.AnimatedSprite - PixiJS
User-assigned function to call when loop is true, and an AnimatedSprite is played and loops around to start again.
Read more >
AnimatedSprite single pass - Pixi.js - HTML5 Game Devs Forum
Hi, I was trying to make my AnimatedSprite run only once. Initially I thought it could be ... onComplete = function () {...
Read more >
Can't get a sprite animation running in Pixijs on React
The issue seems to be calling the function when executing the code, not after the spritesheet has loaded. Have you tried changing this:...
Read more >
AnimatedSprite - Godot Docs
AnimatedSprite is similar to the Sprite node, except it carries multiple textures as animation frames. Animations are created using a SpriteFrames resource, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found