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

Fix the wrong transparent object menu buttons #4471

Closed
wants to merge 2 commits into from

Conversation

takahirox
Copy link
Contributor

@takahirox takahirox commented Aug 4, 2021

This PR fixes #4416 by introducing renderOrder attribute to hubs-text and rendering the texts of object menu buttons at last.

The screenshot with this PR. Please compare with the one in #4416.

image

My understanding of the mechanism how the problem was caused and how this PR fixes is

  • The text is placed in font of the slice9 and object
  • All of them are transparent and farther objects should be render first
  • Three.js determines the render order by checking the distance of objects from the camera to generally the center of the objects
  • If object group is rotated and/or it is far from the camera, Three.js can wrongly render the texts earlier than object and slice9 (This is the limitation of the current render order decision algorithm)
  • If it happens overlapped area of slice9 and object are not rendered because of depth test. This is the reason why currently texts can be transparent to background
  • An easy solution would be to force the render order of texts to render them at last by using Three.js Object3D.renderOrder

@takahirox
Copy link
Contributor Author

Ah, wait. Making the slice9 opaque would be simpler solution (but it requires #4470). Let me try tomorrow.

@takahirox
Copy link
Contributor Author

Closing in favor of #4470

@takahirox takahirox closed this Aug 4, 2021
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.

The contents of the buttons in object menu can be tranaparent
1 participant