animatedSprite.onComplete is not a function
See original GitHub issueHi, 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:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top 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 >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
Thanks for the fast answer. Can you update the documentation for future users ?
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.