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

CSS2DRenderer: Fix sorting regression. #23360

Merged
merged 1 commit into from
Jan 31, 2022

Conversation

bergden-resonai
Copy link
Contributor

@bergden-resonai bergden-resonai commented Jan 27, 2022

Fixed #23359.

Description

The weakMap is unpopulated for invisible elements
Added an example that should recreate the exception, and populating the weakMap regardless of visibility.

Follow-up to #23316

This contribution is funded by Resonai.

@Mugen87
Copy link
Collaborator

Mugen87 commented Jan 28, 2022

@thisGH Does this look good to you?

@bergden-resonai Do we need to update CSS3DRenderer, too?

@Mugen87 Mugen87 changed the title Add example of invisible elements, fix bug CSS2DRenderer: Fix sorting regression. Jan 28, 2022
@bergden-resonai
Copy link
Contributor Author

@thisGH Does this look good to you?

@bergden-resonai Do we need to update CSS3DRenderer, too?

@Mugen87 - the CSS3DRenderer doesn't fail because it doesn't have the zOrder function (or anything else that assumes the cache is populated), I was unsure if I should refactor this example to use layers
So I don't think there's a need for the equivalent change there

@Mugen87 Mugen87 added this to the r138 milestone Jan 28, 2022
@Mugen87 Mugen87 merged commit f44b760 into mrdoob:dev Jan 31, 2022
donmccurdy pushed a commit to donmccurdy/three.js that referenced this pull request Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When adding a CSS2DObject that's invisible, subsequent calls to zOrder will fail
2 participants