Skip to content
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

Bug: v8.0.0-rc.7 iterating into a container and using removeChild causes object to to not be rendered #10185

Closed
daserra opened this issue Feb 5, 2024 · 0 comments · Fixed by #10187
Assignees
Labels

Comments

@daserra
Copy link

daserra commented Feb 5, 2024

Current Behavior

When iterating through a container to remove each child individually using removeChild, re-adding the same object later sometimes results in the object not rendering.

Expected Behavior

When removing a child and adding it later it should always be rendered.

Steps to Reproduce

The issue can be reproduce here.
https://pixiplayground.com/#/edit/xJo273qZP7r30Rm9Uoseg

//Comment: Removing children using removeChild causes issue container.children.forEach((bunny) => { container.removeChild(bunny); });

//Comment: Using works fine container.removeChildren();

Environment

pixi.js version: v8.0.0-rc.7
Browser & Version: Firefox 122.0, Edge 122.0
OS & Version: Debian and Windows (shouldn't matter)
Running Example: https://pixiplayground.com/#/edit/xJo273qZP7r30Rm9Uoseg

Possible Solution

No response

Additional Information

No response

@Zyie Zyie added the v8 label Feb 5, 2024
@Zyie Zyie linked a pull request Feb 6, 2024 that will close this issue
@Zyie Zyie closed this as completed Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants